第 第三次回顾 Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-16 #1 Select * from aTable where theDate='97-5-6' //有问题,如何更改??? 谢谢!
G gxg8816 Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-16 #2 要看你用什么数据库,再参照相应数据库的SQL语法. 也可考虑用SQL数据库的日期转换函数.
C CJ Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-16 #3 mssql 是可以的,也可以用 where yourdate = convert(datetime,'1997-1-1')
M msb Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-16 #4 Select * from aTable where (EXTRACT(year FROM theDate)=1997) and (EXTRACT(month FROM theDate)=5) and (EXTRACT(day FROM theDate)=6) year---年 month---月 day---日
Select * from aTable where (EXTRACT(year FROM theDate)=1997) and (EXTRACT(month FROM theDate)=5) and (EXTRACT(day FROM theDate)=6) year---年 month---月 day---日
小 小吕 Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-16 #5 如果您用的是Oracle数据库则可以写成 select * from aTable where theDate=TO_DATE('97-5-6','YY-MM-DD')
L liuly Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-16 #6 如果您用的是DBase数据库则可以写成 select * from aTable where theDate="05/06/97"