请求是我先做JOIN的事情,然后添加条件和第一个条件,然后加入。 像这样:
select t1.*, t2.*
form bla t1, blabla t2
where t1.id = t2.id
and t1.number = 3
OR
select t1.*, t2.*
form bla t1, blabla t2
where t1.number = 3
and t1.id = t2.id
答案 0 :(得分:1)
最佳和首选解决方案是使用正确的ANSI / ISO JOIN语法并完全避免这个问题:
SELECT
t1.*, t2.*
FROM
bla t1
INNER JOIN
blabla t2 ON t1.id = t2.id
WHERE
t1.number = 3