ITeye博客

CASE语句的使用

wzg866 · 2010-05-19 09:15 · Oracle · 数据库 · Markdown

1.有条件的级联更新 --update stu.st_rsvr_r1 t3 set t3.belonggd = (select case when t1.addvcd like '44%' then '1' from stu.st_stbprp_b t1,stu update stu.st_rsvr_r1 t3 set t3.belonggd =( select case when t1.addvcd like '44%' then '1' else '0' end b from stu.st_stbprp_b t1 where t1.stcd = t3.stcd) where exists(select 1 from stu.st_stbprp_b t2 where t2.stcd = t3.stcd)

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。