笛卡爾積:多張表相乘,將表中的全部信息都要顯示出來,若是關聯不到的數據就用null代替spa
內鏈接:笛卡爾積中,顯示的數據必須都是都有關聯table
select * from lefttable L ,righttable R where L.主鍵 = R.外鍵 select
select * from lefttable L ,inner join R on L.主鍵 = R.外鍵數據
左(外)鏈接:笛卡爾積中左邊的數據都得顯示tab
select * from L left join R on L.主鍵 = R.外鍵co
select * from L,R where L.主鍵 = R.外鍵(+)join
右(外)鏈接:笛卡爾積中右邊的數據都得顯示 ab
select * from L right join R on L.主鍵 = R.外鍵
select * from L,R where L.主鍵(+) = R.外;