什么是左連接,右連接和完全連接??如下:
select * from testdata!customer;
????left outer join testdata!orders;
????on customer.cust_id=orders.cust_id
????
如果是左連接該命令將返回
join
左側(cè)表
(customer)
中的所有記錄以及右側(cè)表中匹配的記錄;右連接則反之,返回
orders
中所有記錄和
customer
的匹配記錄;完全連接返回兩個(gè)表中的所有記錄。
?
右連接說(shuō)明等號(hào)右側(cè)的所有記錄均會(huì)被顯示,無(wú)論其在左側(cè)是否得到匹配,