![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() 猫猫猫 ![]() ![]() ![]() Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 ![]() |
代码 case when <关系条件表达式> then <SQL语句或者返回值> when <关系条件表达式> then <SQL语句或者返回值> ... when <关系条件表达式> then <SQL语句或者返回值> else <SQL语句或者返回值> end 举例 代码 select count(case when a.zt='07' then a.bs end),
count(case when a.zt='11' then a.bs end) from dj_zt a where a.qylx_dm = '03 |
|
|
![]() ![]() |
Lo-Fi Version | Time is now: 2024-10-22 12:34 |