挂起各语句的执行,直到某个时间点到来或在一定的时间间隔后继续执行 格式 WAITFOR DELAY 间隔 WAITFOR TIME 时间点例如:在10点查询当前的销售情况,这里的时间是服务器 时间,而不是客户端时间 Begin waitfor time ’10:00:00’ select * from sales End
select date'2009-11-11' as d from dual; select * from t where t.day=date'2009-11-11'; 是这个意思
格式
WAITFOR DELAY 间隔
WAITFOR TIME 时间点例如:在10点查询当前的销售情况,这里的时间是服务器
时间,而不是客户端时间
Begin
waitfor time ’10:00:00’
select * from sales
End
select * from t where t.day=date'2009-11-11';
是这个意思
像'yyyy-mm-dd'这样的可以直接用date'xxxx'简化
具体说明我也没找到..
前面加个date转换为日期类型
还是SQL SERVER中的??
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements003.htm#BABGIGCJ