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

猜你喜欢

转载自www.cnblogs.com/messi1314/p/11847846.html
今日推荐