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

SQLÖ÷¼üС½á

SQL ÖеÄÖ÷¼üµÄ×÷ÓÃ:
Äܹ»Î¨Ò»±íʾÊý¾Ý±íÖеÄÿ¸ö¼Ç¼µÄ¡¾×ֶΡ¿»òÕß¡¾×ֶΡ¿µÄ×éºÏ¾Í³ÆÎªÖ÷Âë(Ö÷¼ü)¡£
×÷ÓÃ
1¡¢Ö÷¼üΨһµÄʶ±ðÿһ¼Ç¼;
2¡¢Ö÷¼ü½«¼Ç¼ºÍ´æ·ÅÔÚÆäËû±íÖеÄÊý¾Ý½øÐйØÁª¡£ÔÚÕâÒ»µãÉÏ£¬Ö÷¼üÊDz»Í¬±íÖи÷¼Ç¼֮¼äµÄ¼òµ¥Ö¸Õë¡£
ÈôÓÐÁ½¸ö±íA£¬B£¬keyÊÇAµÄÖ÷¼ü£¬¶øBÖÐÒ²ÓÐkey×ֶΣ¬Ôòkey¾ÍÊDZíBµÄÍâ¼ü¡£
A£¬B¿ÉÒÔͨ¹ýkey½øÐйØÁª¡£
³ýÁËÒÔÉÏ˵µÄ, ÎÒ½ñÌì²âÊÔÖÐ, ·¢ÏÖÓкܶàÊý¾Ýʱ, »¹¿ÉÒÔ¼Ó¿ì²éѯËÙ¶È! ¶øÇÒËٶȺÜÃ÷ÏÔµÄ!
ÓÐЩ֪ʶ, Ö»ÊÇѧÁË, ¾ßÌåÊÇ·ñÊÇÕâÑù, Ö»ÊǸÐÐÔÈÏʶ, ¾­¹ýʵ¼ù·¢ÏÖ, ¾ÍÓÐÁËÀíÐԵļÇÒä, ¶ÔÓÚÔõôÑù¼Ó¿ìsqlµÄ²éѯËÙ¶È, ¸ÄÌìÔÙÑо¿!


Ïà¹ØÎĵµ£º

ÓÃÒ»¸öSQLÓï¾äʵÏÖ²åÈë¶àÐÐÊý¾ÝµÄ¹¦ÄÜ

insert into A ±í select * from B ±í;
ÔÚoracleÖУ¬Ã¿¸öÓû§Ö»ÄܲÙ×÷×Ô¼ºµÄ±í£¬Òª²Ù×÷ÆäËûÓû§µÄ±íÊÇÐèÒªÆäËûÓû§¸³È¨Ï޵ġ£
grant ȨÏÞ on table to user;
   eg:grant select on table to newuser;
ÈôÒª½øÐÐÁ¬½Ó¾ÍÒªÊÚÓè(resource connect Á½¸ö½ÇÉ«) ......

×ªÔØ SQLÖеÄdatetimeÓ÷¨Ïê½â

×ªÔØ SQLÖеÄdatetimeÓ÷¨Ïê½â
×ªÔØµØÖ·£ºhttp://blog.sina.com.cn/s/blog_495491770100fq4n.html
2009-07-27 09:45  sql server2000ÖÐʹÓÃconvertÀ´È¡µÃdatetimeÊý¾ÝÀàÐÍÑùʽ
ÈÕÆÚÊý¾Ý¸ñʽµÄ´¦Àí£¬Á½¸öʾÀý£º
CONVERT(varchar(16), ʱ¼äÒ», 20) ½á¹û£º2007-02-01 08:02
ʱ¼äÒ»°ãΪ
getdate()
º¯Êý»òÊý¾Ý±íÀïµÄ ......

¸ßЧSQL²éѯ֮Ë÷Òý£¨VI)

ÎÒÃÇÏÈ¿´ NestedLoop ºÍ MergeJoin µÄËã·¨£¨ÒÔÏÂΪÒýÓ㬼û RicCC µÄ¡¶ ͨÍùÐÔÄÜÓÅ»¯µÄÌìÌà - µØÓü JOIN ·½·¨ËµÃ÷ ¡· ):
==================================
NestedLoop:
   foreach rowA in tableA where tableA.col2=?
    {
    search rowsB from tableB where tab ......

SQL Server 2005 ÖеķÖÇø±íºÍË÷Òý(1)


¹ØÓÚ±¾Îı¾ÎÄËùÃè»æµÄ¹¦Äܺͼƻ®ÊÇÏÂÒ»°æ±¾ SQL Server µÄ¿ª·¢·½Ïò¡£ËüÃDz¢·Ç±¾²úÆ·µÄ˵Ã÷Ê飬ÈçÓиü¸Ä£¬Ë¡²»ÁíÐÐ֪ͨ¡£¶ÔÓÚ×îÖÕ²úÆ·ÊÇ·ñ¾ßÓÐÕâЩ¹¦Äܲ»×öÈκÎÃ÷ʾ»ò°µÊ¾µÄ±£Ö¤¡£¶ÔÓÚijЩ¹¦ÄÜ£¬±¾ÎļÙÉè¶ÁÕßÊìϤ SQL Server 2000 ¹¦ÄܺͷþÎñ¡£Óйر³¾°ÐÅÏ¢£¬Çë·ÃÎÊSQL Server ÍøÕ¾»ò SQL Server 2000 ×ÊÔ´¹¤¾ß°ü¡£Õâ²¢²»Ê ......

sqlÓÅ»¯50Ìõ

ËäÈ»²éѯËÙ¶ÈÂýµÄÔ­ÒòºÜ¶à£¬µ«ÊÇÈç¹ûͨ¹ýÒ»¶¨µÄÓÅ»¯£¬Ò²¿ÉÒÔʹ²éѯÎÊÌâµÃµ½Ò»¶¨³Ì¶ÈµÄ½â¾ö¡£ ²éѯËÙ¶ÈÂýµÄÔ­ÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ£º
     1¡¢Ã»ÓÐË÷Òý»òÕßûÓÐÓõ½Ë÷Òý(ÕâÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐòÉè¼ÆµÄȱÏÝ)
     2¡¢i/oÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£
   &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ