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

SQLÁ¬½Ó·ÖÀ༰ʹÓÃ˵Ã÷

 Í¨¹ýÁ¬½ÓÔËËã·û¿ÉÒÔʵÏÖ¶à¸ö±í²éѯ¡£Á¬½ÓÊǹØϵÊý¾Ý¿âÄ£Ð͵ÄÖ÷ÒªÌص㣬ҲÊÇËüÇø±ðÓÚÆäËüÀàÐÍ
Êý¾Ý¿â¹ÜÀíϵͳµÄÒ»¸ö±êÖ¾¡£
ÔÚ¹ØϵÊý¾Ý¿â¹ÜÀíϵͳÖУ¬±í½¨Á¢Ê±¸÷Êý¾ÝÖ®¼äµÄ¹Øϵ²»±ØÈ·¶¨£¬³£°ÑÒ»¸öʵÌåµÄËùÓÐÐÅÏ¢´æ·ÅÔÚ
Ò»¸ö±íÖС£µ±¼ìË÷Êý¾Ýʱ£¬Í¨¹ýÁ¬½Ó²Ù×÷²éѯ³ö´æ·ÅÔÚ¶à¸ö±íÖеIJ»Í¬ÊµÌåµÄÐÅÏ¢¡£Á¬½Ó²Ù×÷¸øÓû§´ø
À´ºÜ´óµÄÁé»îÐÔ£¬ËûÃÇ¿ÉÒÔÔÚÈκÎʱºòÔö¼ÓеÄÊý¾ÝÀàÐÍ¡£Îª²»Í¬ÊµÌå´´½¨ÐÂµÄ±í£¬¶ûºóͨ¹ýÁ¬½Ó½øÐÐ
²éѯ¡£
Á¬½Ó¿ÉÒÔÔÚSELECT Óï¾äµÄfrom×Ó¾ä»òWHERE×Ó¾äÖн¨Á¢£¬ËÆÊǶø·ÇÔÚfrom×Ó¾äÖÐÖ¸³öÁ¬½ÓʱÓÐÖúÓÚ
½«Á¬½Ó²Ù×÷ÓëWHERE×Ó¾äÖеÄËÑË÷Ìõ¼þÇø·Ö¿ªÀ´¡£ËùÒÔ£¬ÔÚTransact-SQLÖÐÍƼöʹÓÃÕâÖÖ·½·¨¡£
SQL-92±ê×¼Ëù¶¨ÒåµÄfrom×Ó¾äµÄÁ¬½ÓÓï·¨¸ñʽΪ£º
from join_table join_type join_table
[ON (join_condition)]
ÆäÖÐjoin_tableÖ¸³ö²ÎÓëÁ¬½Ó²Ù×÷µÄ±íÃû£¬Á¬½Ó¿ÉÒÔ¶Ôͬһ¸ö±í²Ù×÷£¬Ò²¿ÉÒÔ¶Ô¶à±í²Ù×÷£¬¶Ôͬһ
¸ö±í²Ù×÷µÄÁ¬½ÓÓÖ³Æ×ö×ÔÁ¬½Ó¡£
join_type Ö¸³öÁ¬½ÓÀàÐÍ£¬¿É·ÖΪÈýÖÖ£ºÄÚÁ¬½Ó¡¢ÍâÁ¬½ÓºÍ½»²æÁ¬½Ó¡£ÄÚÁ¬½Ó(INNER JOIN)ʹÓñÈ
½ÏÔËËã·û½øÐбí¼äij(Щ)ÁÐÊý¾ÝµÄ±È½Ï²Ù×÷£¬²¢ÁгöÕâЩ±íÖÐÓëÁ¬½ÓÌõ¼þÏàÆ¥ÅäµÄÊý¾ÝÐС£¸ù¾ÝËùʹÓÃ
µÄ±È½Ï·½Ê½²»Í¬£¬ÄÚÁ¬½ÓÓÖ·ÖΪµÈÖµÁ¬½Ó¡¢×ÔÈ»Á¬½ÓºÍ²»µÈÁ¬½ÓÈýÖÖ¡£
ÍâÁ¬½Ó·ÖΪ×óÍâÁ¬½Ó(LEFT OUTER JOIN»òLEFT JOIN)¡¢ÓÒÍâÁ¬½Ó(RIGHT OUTER JOIN»òRIGHT JOIN)
ºÍÈ«ÍâÁ¬½Ó(FULL OUTER JOIN»òFULL JOIN)ÈýÖÖ¡£ÓëÄÚÁ¬½Ó²»Í¬µÄÊÇ£¬ÍâÁ¬½Ó²»Ö»ÁгöÓëÁ¬½ÓÌõ¼þÏàÆ¥
ÅäµÄÐУ¬¶øÊÇÁгö×ó±í(×óÍâÁ¬½Óʱ)¡¢ÓÒ±í(ÓÒÍâÁ¬½Óʱ)»òÁ½¸ö±í(È«ÍâÁ¬½Óʱ)ÖÐËùÓзûºÏËÑË÷Ìõ¼þµÄ
Êý¾ÝÐС£
½»²æÁ¬½Ó(CROSS JOIN)ûÓÐWHERE ×Ӿ䣬Ëü·µ»ØÁ¬½Ó±íÖÐËùÓÐÊý¾ÝÐеĵѿ¨¶û»ý£¬Æä½á¹û¼¯ºÏÖеÄ
Êý¾ÝÐÐÊýµÈÓÚµÚÒ»¸ö±íÖзûºÏ²éѯÌõ¼þµÄÊý¾ÝÐÐÊý³ËÒÔµÚ¶þ¸ö±íÖзûºÏ²éѯÌõ¼þµÄÊý¾ÝÐÐÊý¡£
Á¬½Ó²Ù×÷ÖеÄON (join_condition) ×Ó¾äÖ¸³öÁ¬½ÓÌõ¼þ£¬ËüÓɱ»Á¬½Ó±íÖеÄÁкͱȽÏÔËËã·û¡¢Âß¼­
ÔËËã·ûµÈ¹¹³É¡£
ÎÞÂÛÄÄÖÖÁ¬½Ó¶¼²»ÄܶÔtext¡¢ntextºÍimageÊý¾ÝÀàÐÍÁнøÐÐÖ±½ÓÁ¬½Ó£¬µ«¿ÉÒÔ¶ÔÕâÈýÖÖÁнøÐмä½Ó
Á¬½Ó¡£ÀýÈ磺
SELECT p1.pub_id,p2.pub_id,p1.pr_info
from pub_info AS p1 INNER JOIN pub_info AS p2
ON DATALENGTH(p1.pr_info)=DATALENGTH(p2.pr_info)
(Ò»)ÄÚÁ¬½Ó
ÄÚÁ¬½Ó²éѯ²Ù×÷ÁгöÓëÁ¬½ÓÌõ¼þÆ¥ÅäµÄÊý¾ÝÐУ¬ËüʹÓñȽÏÔËËã·û±È½Ï±»Á¬½ÓÁеÄÁÐÖµ¡£ÄÚÁ¬½Ó·Ö
ÈýÖÖ£º
1¡¢µÈÖµÁ¬½Ó£ºÔÚÁ¬½ÓÌ


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

sql´æ´¢¹ý³Ì

 ÔÚASP.NetÏîÄ¿ÖÐʹÓô洢¹ý³Ì,Ê×ÏÈ¿ÉÒÔÌá¸ßÊý¾Ý¿âµÄ°²È«ÐÔ£¬Æä´Î¿ÉÒÔÌá¸ßÔËÐÐSQL´úÂëÔËÐеÄËٶȣ¬ÔÚ´óÐÍÏîÄ¿ÖÐÒ»°ãÊDZز»¿ÉÉٵġ£Visual Studio.NetΪSQLµÄ´æ´¢¹ý³ÌÌṩÁËÇ¿´óµÄÖ§³Ö£¬Äú¼È¿ÉÒÔͨ¹ývisual studio.netÀ´Ð½¨´æ´¢¹ý³Ì£¬Ò²¿ÉÒÔÖ±½ÓÔÚSql ServerµÄ²éѯ·ÖÎöÆ÷ÖÐÔËÐУ¬»¹¿ÉÒÔͨ¹ýÆóÒµ¹ÜÀíÆ÷´´½¨£¬Ê¹ÓÃÆðÀ´Ò² ......

SqlÐÔÄÜÓÅ»¯

 
²Ù×÷·ûÓÅ»¯
IN ²Ù×÷·û
ÓÃINд³öÀ´µÄSQLµÄÓŵãÊDZȽÏÈÝÒ×д¼°ÇåÎúÒ׶®£¬Õâ±È½ÏÊʺÏÏÖ´úÈí¼þ¿ª·¢µÄ·ç¸ñ¡£
µ«ÊÇÓÃINµÄSQLÐÔÄÜ×ÜÊDZȽϵ͵ģ¬´ÓORACLEÖ´ÐеIJ½ÖèÀ´·ÖÎöÓÃINµÄSQLÓë²»ÓÃINµÄSQLÓÐÒÔÏÂÇø±ð£º
ORACLEÊÔͼ½«Æäת»»³É¶à¸ö±íµÄÁ¬½Ó£¬Èç¹ûת»»²»³É¹¦ÔòÏÈÖ´ÐÐINÀïÃæµÄ×Ó²éѯ£¬ÔÙ²éѯÍâ²ãµÄ±í¼Ç¼£¬Èç¹ûת»»³ ......

Excel VBA ʵÏÖSQLÊý¾Ý¶ÁÈ¡K3ÈËÔ±ÐÅÏ¢

Private Sub CommandButton1_Click()
Worksheets("Sheet2").Select
    Cells.Select
     Selection.Delete Shift:=xlUp
     Range("A1").Select
'Çå³ýÔÚExcelÖеÄÊý¾Ý,È·±£µ¼ÈëÐÅÏ¢²»³öÏÖÓëÔ­ExcelÊý¾Ý½øÐеþ¼Ó
Dim cnnConnect As Object
Dim rstR ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ