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' ---ÄãÖ´ÐÐÒ»ÏÂÕâ¸ö£¬¾ÍÖªµÀÁË
´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......