易截截图软件、单文件、免安装、纯绿色、仅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经典面试题集(二)

第十一题:
有表students(name,class,grade),请用标准sql语句完成
name class grade
张三 数学 81
李四 语文 70
王五 数学 90
张三 语文 60
李四 数学 100
王五 语文 90
王五 英语 81
要求: 用sql语句输出各门功课都大于80分的同学姓名?
create table students (
name varchar(25),
class varchar(25),
grad ......

ORACLE和POSTGRESQL的SQL语句比较

oracle 方法                                                & ......

SQL语句PART5

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

SQL语句PART8

PairWise subquery:
e.g.:
select * from wf_docsort where (ndocsortid,nmoduleinfoid)  in (select ndocsortid, nmoduleinfoid from wf_docsort where instr(cname,'文')>0)
the above sql is the same function as:
select * from wf_docsort where ndocsortid = (select ndocsortid from wf_docsort where ......

SQL语句PART11


1. My test: (create and grant the sysdba to a new user by SQL*Plus)
CREATE USER FJTEST1 IDENTIFIED BY JEANJEANFANG;
GRANT SYSDBA TO FJTEST;
REVOKE SYSDBA from FJTEST;
CONNECT FJTEST1/JEANJEANFANG AS SYSDBA;
2. Using ORAPWD in windows:
C:\» ORAPWD;
(show help information)
3. to see th ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号