±ê×¼µÄ SQL µÄ½âÎö˳Ðò
±ê×¼µÄ SQL µÄ½âÎö˳ÐòΪ:
(
1
).
from
×Ó¾ä, ×é×°À´×Ô²»Í¬Êý¾ÝÔ´µÄÊý¾Ý
(
2
).
WHERE
×Ó¾ä, »ùÓÚÖ¸¶¨µÄÌõ¼þ¶Ô¼Ç¼½øÐÐɸѡ
(
3
).
GROUP
BY
×Ó¾ä, ½«Êý¾Ý»®·ÖΪ¶à¸ö·Ö×é
(
4
).ʹÓþۺϺ¯Êý½øÐмÆËã
(
5
).ʹÓÃ
HAVING
×Ó¾äɸѡ·Ö×é
(
6
).¼ÆËãËùÓеıí´ïʽ
(
7
).ʹÓÃ
ORDER
BY
¶Ô½á¹û¼¯½øÐÐÅÅÐò
select
*
,row_number()
over
(
order
by
productname)
as
rownumber
from
products
where
rownumber
between
10
and
20
--
Õâ±ß»¹Ã»²úÉúrownumber ¾ÍÒýÓÃÁË
Ïà¹ØÎĵµ£º
1 ÈçºÎËøÒ»¸ö±íµÄijһÐÐ
A Á¬½ÓÖÐÖ´ÐÐ
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
begin tran
selec ......
ÔÚ×ö¹ýµÄºÜ¶àÏîÄ¿ÖУ¬·¢ÏÖ´ó¼Ò²»¹Ü¶Ôʲô±í£¬·êselect±Ø¶¨¼ÓÉÏnolock£¨»òÕßwith£¨nolock£©£©£¬ºÃÏñÒѾÊÇÖƶȻ¯µÄÒ»ÖÖ¶«Î÷¡£ÓÐÁìµ¼¸ßÈ˽âÊÍ˵¼ÓÉÏnolock¿ÉÒÔÌá¸ß²éѯËٶȣ¬²»Ó°Ïì¶ÔÊý¾Ý±íµÄÆäËû²¢·¢²Ù×÷¡£
¡¡¡¡µ«ÊÇÕæÓбØҪÿ¸ö²éѯ¶¼¼ÓnolockÂ𣿸öÈËÈÏΪ¼Ó²»¼Ónolock»¹ÊÇÖµµÃÎÒÃǸù¾Ýʵ¼ÊÇé¿öÕå×ÃÒ»·¬µÄ£¨ÖÁ ......
1¡¢ÎļþºÍÎļþ×éµÄº¬ÒåÓë¹Øϵ
ÿ¸öÊý¾Ý¿âÓÐÒ»¸öÖ÷Êý¾ÝÎļþ.ºÍÈô¸É¸ö´ÓÎļþ¡£ÎļþÊÇÊý¾Ý¿âµÄÎïÀíÌåÏÖ¡£ Îļþ×é¿ÉÒÔ°üÀ¨·Ö²¼ÔÚ¶à¸öÂß¼·ÖÇøµÄÎļþ£¬ÊµÏÖ¸ºÔØƽºâ¡£Îļþ×éÔÊÐí¶ÔÎļþ½øÐзÖ×飬ÒÔ±ãÓÚ¹ÜÀíºÍÊý¾ÝµÄ·ÖÅ䣯·ÅÖá£ÀýÈ磬¿ÉÒÔ·Ö±ðÔÚÈý¸öÓ²ÅÌÇý¶¯Æ÷ÉÏ´´½¨Èý¸öÎļþ£¨Data1.ndf¡¢Data2.ndf ºÍ Data3.ndf£©£¬²¢½«ÕâÈý¸ ......
ºØÖÝÊм²²¡Ô¤·À¿ØÖÆÖÐÐÄËùÓõÄZmSoft´ÓÒµÌå¼ìÐÅÏ¢ÍøÂçϵͳV2010.1.26 Õýʽ°æ²ÉÓÃSQL SERVER2000ƽ̨,²»Ã÷ÔÒò,Êý¾Ý¿â"ÖÃÒÉ“,¿Í»§ÊÔ¹ýËùÓÐÍøÉÏ·½·¨,δÄܽâ¾ö.ÉòÑô¿ÎÄÊý¾Ý»Ö¸´ÖÐÐÄSQLÊý¾Ý¿â¹¤³Ìʦ³É¹¦½«Æä½â¾ö.
ÉòÑô¿ÎÄÊý¾Ý»Ö¸´ÖÐÐÄMS SQL SERVERÑз¢Ð¡×éÖÂÁ¦ÓÚMsSqlÊý¾Ý¿â¼¼ÊõµÄÑо¿¡£¾¹ý¶àÄêÑо¿ÍêÈ«ÕÆÎÕÁËS ......
Ö¢×´£º
SQL SERVER2005ÀïÃ棬Æô¶¯SQL´úÀí·þÎñ£¬Æô¶¯Õý³££¬µ«ÊÇÔÚsql server ´úÀí»¹ÊÇÏÔʾÒѽûÓôúÀí xp
ÔÚManagement StudioÖÐн¨Î¬»¤¼Æ»®Ê±£¬ÌáʾÒÔÏ´íÎóÐÅÏ¢£º
“´úÀíXP”×é¼þÒÑ×÷Ϊ´Ë·þÎñÆ÷°²È«ÅäÖõÄÒ»²¿·Ö±»¹Ø±Õ¡£ÏµÍ³¹ÜÀíÔ±¿ÉÒÔʹÓÃsp_configureÀ´ÆôÓÓ´úÀíXP”¡£ÓйØÆôÓÓ´úÀíXP ......