注册 登录
编程论坛 SQL Server论坛

查询系统时间

jxawgyl 发布于 2008-06-23 11:12, 1353 次点击
如何在SQL中指定系统时间:如
select * from RecipeView  where  time>= '系统时间'
4 回复
#2
jxyga1112008-06-23 14:38
那就是當前時間啊Date 或TIME
#3
jxawgyl2008-06-23 15:19
是这样写:select * from RecipeView  where  executeoffice= 4008 and addtime>=date
不对阿?
#4
jxawgyl2008-06-23 15:56
谢了,这样对吧:select * from RecipeView  where  executeoffice= 4008 and addtime>=dateadd(day,-1,getdate())
比系统时间小1天
#5
jxyga1112008-06-23 16:04
你用CONVERT试一试
1