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

sql join on Ó÷¨

A left join B µÄÁ¬½ÓµÄ¼Ç¼ÊýÓëA±íµÄ¼Ç¼Êýͬ
A right join B µÄÁ¬½ÓµÄ¼Ç¼ÊýÓëB±íµÄ¼Ç¼Êýͬ
A left join B µÈ¼ÛB right join A
table A:Field_K, Field_A1     a3     b4     ctable B:Field_K, Field_B1     x2     y4     zselect a.Field_K, a.Field_A, b.Field_K, b.Field_B from a left join b on a.Field_K=b.Field_KField_K  Field_A  Field_K  Field_B  ---------- ---------- ---------- ---------- 1     a     1     x    3     b     NULL   NULL4     c     4     z  Ò²¾ÍÊÇ˵left join ÔòÁ¬½Ó×ó±ß±íÖÐËùÓмǼ¶¼»á³öÏÖ£¬Èç¹û¸ù¾ÝÁ¬½ÓÌõ¼þÔÚtable2ÖÐÕÒ²»µ½Ïà¹Ø¼Ç¼£¬ÔòÏÔʾΪnull¡£right join ÔòÏÔʾÓұ߱íÖеÄÈ«²¿¼Ç¼¡£inner join ÔòÖ»ÓзûºÏÌõ¼þµÄ¼Ç¼²Å»á³öÏÖÔÚ½á¹û¼¯ÖС£
 
EG2¡ÃÓÐÁ½±íaºÍb£¬Ç°Á½×Ö¶ÎÍêÈ«Ïàͬ£º(id int,name varchar(10)...)id     name    ----------- ---------- 1      a     2      b     3      cÒÔϵIJéѯÓï¾ä£¬ÄãÖªµÀËüµÄÔËÐнá¹ûÂ𣿣º1.select * from a left join b on a.id=b.id where a.id=12.select * from a left join b on a.id=b.id and a.id=13.select * from a left join b on a.id=b.id and b.id=14.select * from a left join b on a.id=1½á¹û:id     name    id     name    ----------- ----------- ----------- ----------- 1      10     1      10(1 row(s) affected) id     name    id     name    ----------- ----------- ----------- ----------- 1      10     1  


Ïà¹ØÎĵµ£º

SQL SERVER ÓëACCESS¡¢EXCELµÄÊý¾Ýת»»

ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£ ......

JAVAÁ¬½ÓACCESS£¬SQL Server,MySQL,Oracle

import java.sql.*;
/*
* JAVAÁ¬½ÓACCESS£¬SQL Server,MySQL,OracleÊý¾Ý¿â
*
* */
public class JDBC {
  
public static void main(String[] args)throws Exception {
  
   Connection conn=null;
  
       //====Á¬½ÓACCESSÊý¾Ý¿â ......

SQLSERVER SQLÐÔÄÜÓÅ»¯

1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......

×Ô¶¯±¸·ÝSQL2000/MysqlµÄÅú´¦ÀíÎļþ


@echo off
C:
CD "C:\Program Files\WinRAR"
net stop MSSQLserver
winrar.exe a -ag"-[YYYY-MM-DD-HH-MM-SS]" -k -r -s
-ibck -inul "E:\SQL2000±¸·ÝÉú³ÉµÄÎļþ.rar" "E:\SQL2000ËùÔÚÊý¾Ý¿âµÄDataĿ¼µÄλÖÃ\*.*"
net
start MSSQLserver
net stop Mysql
winrar.exe a -ag"-[YYYY-MM-DD-HH-MM-SS]" -k -r -s ......

ÔÚsql server 2005À¸ù¾ÝÊý¾Ý¿âÐÔÄܶ¯Ì¬¹¹½¨Ë÷Òý¡£

ÔÚsql server 2005À¸ù¾ÝÊý¾Ý¿âÐÔÄܶ¯Ì¬¹¹½¨Ë÷Òý¡£
Êý¾Ý¿âÉè¼ÆºÃºó£¬ÏµÍ³ÉÏÏßÔ˶¯Ò»¸öÖÜÆÚºó£¬Êý¾Ý¿âÐÔÄÜÆ¿¾±Í»ÏÖ³öÀ´£¬Õâ¸öʱ¼ä£¬ÐèÒªÒ»ÖÖ¸ù¾ÝÐÔÄÜ£¬À´¶¯Ì¬¹¹½¨Ë÷Òý£¬Ìá¸ß²éѯЧÂÊ¡£
    --¹ý³ÌÓÅ»¯SQL
                  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ