oracle 資料庫的 左連 和 右連

2021-06-28 05:28:39 字數 390 閱讀 1734

a 資訊表  裡面有計畫表id    b 計畫表

現在要查詢關聯的id的字段   並且  資訊表沒有 計畫id的資料   用到這個左   因為   資訊表在左  就可以查詢出來

select a.* from yt_tdkb_xxlr a  left join  yt_tdkb_jhb b on a.fxxjhsjid  = b.fid

如果這裡寫成right 的話   就以計畫表    這樣吃能查詢出  有關聯id的 資料  沒有的  查詢不到了

select a.* from yt_tdkb_xxlr a  right  join  yt_tdkb_jhb b on a.fxxjhsjid  = b.fid

left  和  right   的關係是對應 你左邊 或 右邊的哪張表的

JDBC連Oracle資料庫

string drivername oracle.jdbc.driver.oracledriver string url jdbc oracle thin 172.28.139.78 1521 oracts string username scott string password tiger tr...

用PHP連mysql和oracle資料庫效能比較

測試硬體說明 測試使用的是我的愛機,配置如下 cpu c433 記憶體 128m 硬碟 酷魚2代20g 測試軟體說明 win32下用的是windows nt server4,sp5,apache 1.3.12,php3.0.15和php4rc1,mysql 3.22.29,oracle 8.0.5 ...

用PHP連mysql和oracle資料庫效能比較

測試硬體說明 測試使用的是我的愛機,配置如下 cpu c433 記憶體 128m 硬碟 酷魚2代20g 測試軟體說明 win32下用的是windows nt server4,sp5,apache 1.3.12,php3.0.15和php4rc1,mysql 3.22.29,oracle 8.0.5 ...