mysql 的using 用法

using等价于join操作中的on,例如a和b根据id字段关联,那么以下等价
using(id)
on a.id=b.id
以下2个实例等价:
select a.name,b.age from test as a
join test2 as b
on a.id=b.id

select a.name,b.age from test as a
join test2 as b
using(id)

原文:https://blog.csdn.net/gaozongjian/article/details/79622414
 

猜你喜欢

转载自blog.csdn.net/baiguang1234/article/details/86699410