查看: 1142|回复: 2
|
VB 6.0 & SQL data type 问题
[复制链接]
|
|
type: datetime
2004-03-01 10:20:56
.
.
2004-04-03 12:23:23
.
.
2004-12-23 14:23:12
如何retrieve三月份的全部data?
能不能用 select * from [tablename] where ......?
能的话如何写?谢谢! |
|
|
|
|
|
|
|
发表于 16-1-2005 06:48 PM
|
显示全部楼层
sawyih1 于 16-1-2005 05:58 PM 说 :
type: datetime
2004-03-01 10:20:56
.
.
2004-04-03 12:23:23
.
.
2004-12-23 14:23:12
如何retrieve三月份的全部data?
能不能用 select * from [tablename] where .... ...
select * from [tablename] where datetime within '20040301','20040401';
select * from [tablename] where datetime between '20040301' and '20040401';
select * from [tablename] where datetime >= '20040301' and datetime < '20040401'; |
|
|
|
|
|
|
|
发表于 17-1-2005 05:18 PM
|
显示全部楼层
datetime >= '20040301' and datetime < '20040401'
劝你不要 compare string |
|
|
|
|
|
|
| |
本周最热论坛帖子
|