易截截图软件、单文件、免安装、纯绿色、仅160KB

[SQL Server]延迟执行


WAITFOR
指定触发语句块、存储过程或事务执行的时间、时间间隔或事件。
语法
WAITFOR { DELAY 'time' | TIME
'time' }
参数
DELAY
指示 Microsoft® SQL Server™ 一直等到指定的时间过去,最长可达 24 小时。
'time'
要等待的时间。可以按 datetime 数据可接受的格式指定
time,也可以用局部变量指定此参数。不能指定日期。因此,在 datetime 值中不允许有日期部分。
TIME
指示 SQL Server 等待到指定时间。 
注释
执行 WAITFOR 语句后,在到达指定的时间之前或指定的事件出现之前,将无法使用与 SQL Server 的连接。
若要查看活动的进程和正在等待的进程,请使用 sp_who。


相关文档:

SQL语句PART2

Subquery: (single-row subqueries and multi-rows subqueries).
select select_list
from table
where expr operator (select select_list from table);
single-row subqueries operator: =, >, >=, <, <=, <>
e.g.:
1. select department_id, min(salary) from employees group by department_id ......

SQL语句PART5

Confirming granted privileges
Data Dictionary View                Description
ROLE_SYS_PRIVS                System privileges granted to roles
ROLE_TAB_PRIVS    & ......

SQL语句PART6

Differring Constraints:
Constraints can have the following attributes: DEFFERRABLE / NOT DEFFERRABLE,  INITIALLY DEFFERRED / INITIALLY IMMEDIATE.
e.g.:
alter table dept2 add constraint dept2_id_pk primary key (department_id) deferrable initially deferred; // deferring constraint on creation. ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号