我想在sql multiple和using condition中创建select查询,我的查询如下:
select a.name, b.* from event a right join student b on a.id=b.id_place
从上面的查询我想显示表b中的所有列,当a.id!= 0的值时, 如何使用类似
的条件创建SQL查询答案 0 :(得分:0)
要向RIGHT OUTER JOIN查询添加条件,只需添加具有所需条件的WHERE子句。这是一个例子:
select a.name, b.*
from event a right join student b on a.id=b.id_place
where a.id != 0