Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚ·ÖÒ³µÄsqlÓï¾ä

¶ÔÓÚÓÐÖ÷¼ü×Ô¶¯Ôö³¤Êý¾Ý¿â±í£¬ÔÚ½øÐзÖÒ³ÉèÖÃʱ£¬ÎÒÈÏΪ»¹±È½Ï²»´íµÄÊÇ£º
SELECT TOP Ò³´óС *
from TestTable
WHERE (ID >
          (SELECT MAX(id)
         from (SELECT TOP Ò³´óС*Ò³Êý id
                 from ±í
                 ORDER BY id) AS T))
ORDER BY ID


Ïà¹ØÎĵµ£º

sql ²éѯ±íµÄÁÐÃû row_number()

select upper(name) from syscolumns
where id =any
(
select Id from sysobjects where name='tb_city'
)
lower
select row_number() over(order by firmid) from dbo.tb_BuildingMaterial
Éú³É  ×ÔÔö  123
select rank() over(order by firmid) from dbo.tb_BuildingMaterial
Éú³É×ÔÔö123  ¸ù¾ÝÅ ......

SQL SERVER 2008Êý¾Ý¿â¸½¼Ó

 
2008Êý¾Ý¿â¸½¼Ó
 
/*
ÍøÉÏ¿´µ½µÄÕûÀíÁËһϡ£
Ô­ÎĵØÖ·http://database.51cto.com/art/201003/190984.htm
 
 
ÔÚSQL Server 7.0ÖУ¬Î¢ÈíÍƳöÁËsp_attach_dbºÍsp_attach_single_file_dbϵͳ´æ´¢¹ý³Ì¡£
Ëü¶ÔÓÚSQL ServerÊý¾Ý¿â¹ÜÀíÔ±Ö´ÐÐÏÂÃæµÄÈÎÎñÊǷdz£·½±ãµÄ£º
 
1 ʹÓÃsp_attach_d ......

sql ϵͳº¯Êý

1.×Ö·û´®º¯Êý
³¤¶ÈÓë·ÖÎöÓà 
datalength(Char_expr) ·µ»Ø×Ö·û´®°üº¬×Ö·ûÊý,µ«²»°üº¬ºóÃæµÄ¿Õ¸ñ  
substring(expression,start,length) ²»¶à˵ÁË,È¡×Ó´®  
right(char_expr,int_expr) ·µ»Ø×Ö·û´®ÓÒ±ßint_expr¸ö×Ö·û  
×Ö·û²Ù×÷Àà  
upper(char_expr) תΪ´óÐ ......

SQL SERVER200´íÎó´¦Àí ·þÎñÆ÷

´íÎó´¦Àí
ÔÚSQL Server2000ÖгöÏֵĴíÎó¾ßÓÐÒÔϼ¸¸öÌص㣺
´íÎóºÅ£ºÃ¿¸ö´íÎó״̬¶¼¶ÔӦΨһµÄ´íÎóºÅ¡£
´íÎóÐÅÏ¢×Ö·û´®£º´íÎóÐÅÏ¢ÌṩÁËÓйشíÎóÔ­ÒòµÄÕï¶ÏÐÅÏ¢¡£Ðí¶à´íÎóÐÅÏ¢¶¼ÓÐÌæ»»±äÁ¿£¬ÆäÖаüº¬Ò»Ð©ÐÅÏ¢£¬Èç²úÉú´íÎóµÄ¶ÔÏóÃû³Æ¡£Ã¿¸ö´íÎóºÅ¶¼¶ÔӦΨһµÄ´íÎóÐÅÏ¢¡£
ÑÏÖضȣºÑÏÖضȱíʾ´íÎóµÄÑÏÖس̶ȡ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ