SQL serverÑ»·ÖÐÿ¸ôÒ»¶Îʱ¼ä,ÔËÐÐÒ»´ÎÓï¾ä
×î½ü×öÒ»¸öÏîÄ¿,˵ÆðÀ´±È½Ï¶ñ,ÊÇ´ÓÁíÒ»¸ö±íÖжÁÈ¡Êý¾ÝË͵½Õâ¸ö±íÖÐ.¶øÇÒÒªÓô¥·¢Æ÷Ñ»·ÕâЩÄÚÈÝÔÙ·¢³öÈ¥.
¿ÉÊÇÈç¹ûÕâ¸öÊý¾ÝÁ¿ºÜ´óµÄ»°,»áÒ»ÏÂ×Ó¹ÒËÀ.ËùÒÔ¾ÍÏëµ½ÁË.Äܲ»ÄÜ,ÿ´ÎÎÒ´«Ò»µã,¸ô¼¸ÃëÔÙËÍÒ»µã.
ÏÂÃæÊÇÒ»¸ö¼òµ¥µÄÀý×Ó
declare @i int
set @i=1
while @i<101
begin
insert into Cname ([name],csex,Number) values('aaaaaa','1',@i)
set @i=@i+1
if @i%10=0
waitfor DELAY '000:00:30'
end
ÕâÀïÓõ½ÁËwaitfor DELAY
Ïà¹ØÎĵµ£º
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
¡¡¡¡SQL·ÖÀࣺ
¡¡¡¡DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
¡¡¡¡DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
¡¡¡¡DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
¡¡¡¡Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
¡¡¡¡1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
......
Êý¾Ý¿âµÄÐÔÄܲâÊÔ¿ÉÒÔ°ïÖúÄãÌáÇ°ÖªµÀÄãµÄϵͳµÄ¸ºÔØÄÜÁ¦£¬¿ÉÒÔ°ïÖúÄã¸Ä½øϵͳµÄʵʩ»òÉè¼Æ£¬¿ÉÒÔ°ïÖúÄãÈ·¶¨Ò»Ð©Éè¼ÆºÍ±à³ÌÔÔò. µ«ÊÇ£¬ÕâÀïÃæÒ²ÓÐÏÝÚå. Èç¹û²»Ð¡ÐÄ£¬Äã»á×Ô¼º°Ñ×Ô¼ºÏݽøÈ¥£¬È´×îÖÕ²»Ã÷°×ÊÇʲôÔÒò. ÕâÀÎÒÄÃһλÏÈÉúΪÀý£¬À´¿´¿´ËûÔõô×Ô¼º°Ñ×Ô¼º¸ãºýÍ¿µÄ.
×î½ü, ÏëÆðÔÚ´æ´¢¹ý³ÌÖо¿¾¹ÊÇʹÓÃÁÙʱ±í»¹ÊÇÊ ......
SQL±¦µä
SQL±ØÖª±Ø»áµÚÈý°æ
SQLÈëÞµäµÚËÄ°æ
Sams Teach Yourself SQL in 10 Minutes Third Edition
SQL The Complete Reference
......
SQL Server µÃµ½ÐкŵÄSQL
ʹÓÃÁÙʱ±í£º
select id=identity(int,1,1),value into #temp from YourTable
select * from #temp
drop table #temp
È¡µÃµÚ11µ½20ÐмǼ£º
select IDENTITY(in ......
Ò»£ºSelectÓï¾ä£º
select ×Ö¶ÎÃû from ±íÃû where Ìõ¼þ order by ÅÅÐò
see:select distinct ´Ó¶à¸öÏàͬ×Ö¶ÎÖÐץΨһֵ
see:²éÕÒld_det_andy±íÖÐÓÐÊý¾Ýµ«ld_det_temp±íÖÐûÊý¾ÝµÄÊý¾Ý
select * from ld_det_a ......