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)
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)