sql case when then ...虚心求教
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/23 19:44:33
sql case when then ...虚心求教
select
case salary
when 5000 then '高薪'
when 4500 then '中薪'
when 3500 then '中低薪'
else 'null'
end as '工资等级'
from telenolist
我想统计各个工资级别的人数 那个count(*)应该放在语句的哪里,还用再填写别的语句吗?.
select
case salary
when 5000 then '高薪'
when 4500 then '中薪'
when 3500 then '中低薪'
else 'null'
end as '工资等级'
from telenolist
我想统计各个工资级别的人数 那个count(*)应该放在语句的哪里,还用再填写别的语句吗?.
select
count(*) as cnt,
case salary
when 5000 then '高薪'
when 4500 then '中薪'
when 3500 then '中低薪'
else 'null'
end as '工资等级'
from telenolist
group by case salary
when 5000 then '高薪'
when 4500 then '中薪'
when 3500 then '中低薪'
else 'null'
end
count(*) as cnt,
case salary
when 5000 then '高薪'
when 4500 then '中薪'
when 3500 then '中低薪'
else 'null'
end as '工资等级'
from telenolist
group by case salary
when 5000 then '高薪'
when 4500 then '中薪'
when 3500 then '中低薪'
else 'null'
end
sql case when then ...虚心求教
SQL语句case when
sql case when请教
sql语句 case when or
case when.then.else.end
case when then else end
Sql文的where中使用case when
--简单Case函数 CASE sex WHEN '1' THEN '男' WHEN '2' THEN '女' ELSE
(case A.ZT when 1 then 's318' else null end)
CASE a WHEN 1 THEN b ELSE NULL END
PLSQL中,select case..when..then..怎么用?
SELECT CASE ABC.A WHEN'否' THEN'1' WHEN'是' THEN'-1' END AS 出入