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

posted @ 2019-11-13 11:49  海华风光  阅读(646)  评论(0)    收藏  举报