今日成果:
select
o.order_id,c.first_name from orders o
natural join customers c;
-- 自然连接:连接两个表相同的列,查询结果由数据库引擎决定,不建议使用。
select s.name as shipper,p.name as products from shippers s
cross join products p
order by s.name;
-- 交叉连接显式写法
-- 交叉连接:两张表结果自由组合。建议显式写法
select s.name as shipper,p.name as products
from shippers s,products p
order by s.name;
-- 交叉连接隐式写法
感谢各位读者查阅,欢迎各位👍点赞✍评论⭐收藏+关注!