+ -
当前位置:首页 → 问答吧 → pgsql的Case when的小问题!

pgsql的Case when的小问题!

时间:2011-12-16

来源:互联网

case aaa when 1 then 'a' when 2 then 'b' when in (3,4) then 'c'else 'd' end

红色的部分对吗?如果不对该怎么写呢?


谢谢!

作者: love_u_qt   发布时间: 2011-12-16

case when aaa=1 then 'a' when aaa=2 then 'b' when aaa in (3,4) then 'c'else 'd' end

作者: trainee   发布时间: 2011-12-17

只能拆开写。
when 3 then 'c' when 4 then 'c'

作者: ACMAIN_CHM   发布时间: 2011-12-17

热门下载

更多