Sqlserver ÖÐunionºÍorder by ×Ó¾äµÄÎÊÌâ
UnionĬÈÏÊDz»ÄÜÓÐorder by×Ó¾ä
Èç¹ûÐèÒªÅÅÐò£¬ÔòÖ»ÄÜÈçÏÂʵÏÖ
select * from (select top 100 PERCENT * from ±íÃû order by ×Ö¶ÎÃû) a
union all
select * from (select top 100 PERCENT * from ±íÃû order by ×Ö¶ÎÃû) b
Ïà¹ØÎĵµ£º
ÓÐÍâÀ´³ÌÐò°²×°»ùÓÚ.NET FRAMEWORK 3.5µÄÓ¦ÓóÌÐòÔÚÄÚÍøµÄPCÉÏ£¬ÐèҪͨ¹ýISA·À»ðǽ¿Í»§¶Ë¾¹ý·þÎñÆ÷ÉϵÄISA2006 SP1·ÃÎÊÍâÍøµÄSQLSERVER2005Êý¾Ý¿â¡£
°´ÕÕÒÔÍù¾Ñ飬ÐèÒªÅäÖÃÒ»ÌõSQLSERVER2005·þÎñÆ÷ËùÔÚµÄIPµØÖ·µÄ³öÕ¾¹æÔò£¬²¢ÇÒ²¢²»ÐèÒªÉèÖÃÒ»Ìõ»ùÓÚÓòÃûµÄ¹æÔò¡£
&nb ......
²âÊÔµÄʱºò±È½ÏÖØÒª£¬ÎÒÃÇ¿ÉÒÔÖªµÀµ±Ç°½»Ò×Ó°ÏìÁËÄÄЩ±í
--ÓÃÓڼǼÓû§ÔÚµ±Ç°±íÉÏʲôʱºò¡¢×öµÄʲô²Ù×÷£ºupdate¡¢insert¡¢delete
create table TriggerRecord
(
operdt datetime, --´¥·¢Ê±¼ä
opertp varchar(10), --²Ù×÷ÀàÐÍ£ºupdate¡¢insert¡¢delete
opertb varchar(50) --±íÃû ......
SELECT convert(char,ÈÕÆÚ×Ö¶Î,120) as date2 from table
mssqlĬÈÏÒÔϵͳʱ¼ä¸ñʽÊä³ö£¬Äã¿ÉÒÔµ÷ÕûϵͳµÄʱ¼ä¸ñʽÀ´½â¾ö
µ±È»ÊÇÔÚ³ÌÐòÀï½â¾ö±È½ÏÁé»î£¬convert(char,date,N)Êä³öµÄ¸÷ÖÖÑùʽ
N ÈÕÆÚÑùʽ
0 04& ......
ÓÃwindowsÕ˺Ż¹ÊÇ¿ÉÒԵǼµÄ¡£
²éÕÒÎÊÌâµÄ¹ý³Ì£º
µÚÒ»²½£º Æô¶¯ËùÓÐÓëSQLÓйصķþÎñ£¬ÎÊÌâÒÀ¾É£»
µÚ¶þ²½£º ²é¿´windows·À»ðǽ£¬±»Ä¬ÈÏÆô¶¯ÁË£¬²»Æô¶¯Ñ¡ÔñÏî±»Disabled¡£Á½¸öÌáʾ“ÓÉÓÚ°²È«¿¼ÂÇ,ijЩÉèÖÃÓÉ×é²ßÂÔ¿ØÖÆ”“Windows·À»ðǽÕýÔÚʹÓÃÄúµÄÓòÉèÖÔ£¬ÏÈÓÃgpedit.msc´ò×é²ßÂÔ±à¼Æ÷£¬» ......