select top 12 month=identity(int,1,1) into #t from sysobjects
select * from #t
?? http://topic.csdn.net/u/20090906/17/a91cd31e-abf7-4190-8486-c5491aa63c71.html?seed=1380177511&r=59598572#r_59598572 SELECT * from ( SELECT 1 AS 'MONTH' UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 ) T 樓ÉÏÕý½â ÎÒϲ»¶Ò»Â¥µÄ´ð°¸£¬£¬ÄÜ·ñ½âÊÍÒ»ÏÂÔÒò¡£¡£ MASTER..SPT_VALUES ÊÇϵͳ±í
SQL code:
select number from MASTER..SPT_VALUES where type='p' ---ÄãÖ´ÐÐÒ»ÏÂÕâ¸ö£¬¾ÍÖªµÀÁË
http://topic.csdn.net/u/20091008/12/a2577eba-1b5b-4e1e-ab20-0a047bf3f8d7.html?4385 1Â¥ liangCK SQL code: update a set ʱ¼ä = b.ʱ¼ä from tb1 as a join tb2 as b on a.¿¨ºÅ= b.¿¨ ......