麻烦前辈们帮小弟看一下这个语句该怎么写呢?????

来源:百度知道 编辑:UC知道 时间:2024/06/26 05:35:32
sql数据库里有字段date 我是设置自动取出当前时间的:getDate() 格式为2006-05-06 23:23
现在有一个字符串string s="2005-06-04";
我想查找s以后的数据,也就是说2005-06-04以后的数据(不带时间,光有日期)
请问该怎么实现呢,如果有存储过程就更好啦???

"Select * from TABLE where date between #" & s & "# and #" & left(str(getdate()),10) & "#"

SQL好像要求在日期的两侧加上“#”作为标志。

用sql语句吗?
select * from 表
where 日期列 between '2005-06-04' and getDate();

存储过程??