什么是數據庫左連接
什么是左連接,右連接和完全連接??如下:
select * from testdata!customer;
????left outer join testdata!orders;
????on customer.cust_id=orders.cust_id
????
如果是左連接該命令將返回
join
左側表
(customer)
中的所有記錄以及右側表中匹配的記錄;右連接則反之,返回
orders
中所有記錄和
customer
的匹配記錄;完全連接返回兩個表中的所有記錄。
?
右連接說明等號右側的所有記錄均會被顯示,無論其在左側是否得到匹配,
posted on 2006-07-17 17:00 謝瑋 閱讀(2215) 評論(2) 編輯 收藏 所屬分類: 數據持久化