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

SQL Server 2005 ÖÐ ROW_NUMBER() º¯ÊýµÄ¼òµ¥Ó÷¨

±íÃû£ºd_ClientInfo
Óï¾ä×÷ÓãºÈ¡³öµÚ100-120ÌõÊý¾Ý
 SELECT *
from (SELECT ROW_NUMBER() OVER (ORDER BY ClientID ASC) AS ROWID, * from d_ClientInfo) AS tmpTable
WHERE ROWID BETWEEN 100 AND 120
´Ëº¯Êý»áΪÊý¾Ý±íÖØбàºÅ²¢Ð½¨Êý¾ÝÁÐROWID£¬²»ÐèÒªµÄÆÁ±Îµô¾ÍOKÁË¡£


Ïà¹ØÎĵµ£º

¡¾SQL¡¿Ê¹ÓÃÒ»ÌõINSERTÓï¾äÍê³É¶à±í²åÈë

ÕâÊÇÒ»Ìõµß¸²³£¹æµÄ²åÈë·½·¨£¬Ò»ÌõINSERTÓï¾ä¿ÉÒÔÍê³ÉÏò¶àÕűíµÄ²åÈëÈÎÎñ¡£Ð¡Ð¡µØչʾһÏÂÕâÖÖ²åÈë·½·¨¡£
1.´´½¨±íT²¢³õʼ»¯²âÊÔÊý¾Ý£¬´Ë±í×÷ΪÊý¾ÝÔ´¡£
sec@ora10g> create table t (x number(10), y varchar2(10));
sec@ora10g> insert into t values (1,'a');
sec@ora10g> insert into t values (2,'b');
......

ËѼ¯µÄһЩLINQ to SQLµÄ×ÊÁÏ

MSDN: http://msdn.microsoft.com/en-us/library/bb386976.aspx £¨Ó¢ÎÄ£©
           http://msdn.microsoft.com/zh-cn/library/bb386976.aspx £¨ÖÐÎÄ£©
ScottGu µÄLINQ ϵÁУº
Part 1: Introduction to LINQ to SQL
Part 2: Defining our Dat ......

SQL Server Öвéѯ·ÇÖÐÎÄ£¬·ÇÓ¢ÎÄ£¬·ÇÊý×ÖµÄÌØÊâÁÐ

½ñÌìÔÚ´¦ÀíÒ»¸öÓû§ÃûÊý¾Ý¿âʱ£¬·¢ÏÖÓÐЩ²»Õý³£µÄÊý¾Ý´æÔÚ£¬°´ÕÕÂß¼­£¬Óû§ÃûÖ»ÄÜÊÇÊý×Ö£¬×Öĸ£¬Ï»®Ïߺʹ¿ÖÐÎÄÕâÑùµÄ×Ö·û×éºÏ´æÔÚ£¬²»Ó¦¸ÃÓÐÆäËû×éºÏ´æÔÚ£¬µ«ÊÇ·¢ÏÖÊý¾Ý¿âÖÐÓÉÓÚ¸÷ÖÖÀúÊ·Ô­Òò£¬ÓÐЩ²»Õý³£µÄ´æÔÚ£¬ÈçºÎÕÒµ½ÕâЩÒì³£Êý¾Ý£¬ÔÚCSDNµÄ SQL Server °æÎÊÁËÕâÑùÁ½¸öÎÊÌ⣬ÈçÏ£º http://topic.csdn.net/u/20100111 ......

ORACLE SQLÐÔÄÜÓÅ»¯´ó×ܽá

ORACLE SQLÐÔÄÜÓÅ»¯´ó×ܽá
1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
" ?; J) n+ v8 J- v" q    OracleµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡ ......

SQLÓï¾äÓÅ»¯·½·¨30Àý

ÔÚSQLÓï¾äÓÅ»¯¹ý³ÌÖУ¬ÎÒÃǾ­³£»áÓõ½hint,ÏÖ×ܽáÒ»ÏÂÔÚSQLÓÅ»¯¹ý³ÌÖг£¼ûOracle HINTµÄÓ÷¨£º
1. /*+ALL_ROWS*/
±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑÍÌÍÂÁ¿,ʹ×ÊÔ´ÏûºÄ×îС»¯.
ÀýÈç:
SELECT /*+ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO='SCOTT';
2. /*+FIRST_ROWS*/
±íÃ÷¶ÔÓï¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ