0
我有一个选择,我想通过左连接搜索一个表的列只有当用户启用了前置条件来搜索搜索作为添加表的条件我有点困惑,我不知道如果我单独搜索或我立刻做的一切.... 他说,这是我看的MySQL系统,但我看到这么如果选择添加代码块
if .condition... then ... end if;
我的代码
select user. * from
u user
if (u.visible == 1,
left join houseUser hu on u.id = h.id_user
left join h house on hu.id_house = h.id_house
)
where
u.age> 30
如果可见,添加该代码可以看到用户在哪个房屋。