sql联结

1.内联结(等值联结)

select vend_name,prod_name,prod_price

from vendors,products

where vendors.vend_id = products.vend_id

等效于

select vend_name,prod_name,prod_price

from vendors inner join products

on vendors.vend_id = products.vend_id

2.左联结

select customers.cust_id,orders.order_num

from customers left outer join orders

on customers.cust_id = orders.cust_id

posted on 2013-07-08 14:59  awk  阅读(139)  评论(0)    收藏  举报

导航