rs p where a.city =p.city
本执行结果集中有两个列字段名为city的,因为前面没有指明那个表中的city例如:select a.city from authors a,publishers p where a.city =p.city
以下两个不同:
USE pubs
SELECT a.au_fname, a.au_lname, p.pub_name
FROM authors a LEFT OUTER JOIN publishers p
ON a.city = p.city
ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC
USE pubs
SELECT a.*, p.*
FROM authors a LEFT OUTER JOIN publishers p
ON a.city = p.city
ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC这个将会把authors 中所有显示出来,在每条记录的后面凡是 publishers 中的字段都为null除了city在authors中
没有的字段