可以这样查询吗:
select char1,char2,char3 from tab1,tab2 where char4=sdf
以前课本上好象有这种写法,请教这样行吗,如果要改,在哪里改一下。
如果tab1和tab2是主外键关联,那么最好写成如下形式:
select a.char1,a.char2,b.char3
from tab1 a,tab2 b
where a.id=b.id
and b.char4=sdf
select a.char1,a.char2,b.char3
from tab1 a,tab2 b
where a.id=b.id
and b.char4=sdf