Oracle 判断表值是否在另一个表中,并生成新虚拟列
select ps.*,case
when psi.id in ps.pid
then 'true'
else 'false'
end resCol
from Table1 ps left join Table2 psi
on ps.id=psi.pid
select ps.*,case
when psi.id in ps.pid
then 'true'
else 'false'
end resCol
from Table1 ps left join Table2 psi
on ps.id=psi.pid