这个能合并成一句吗?select count(ITEMKIND) from ITEM where ITEMKIND='1
来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/11/08 06:42:37
这个能合并成一句吗?
select count(ITEMKIND) from ITEM where ITEMKIND='1' ;
select count(ITEMKIND) from ITEM where ITEMKIND='2 ;
select count(ITEMKIND) from ITEM where ITEMKIND='3' ;
select count(ITEMKIND) from ITEM where ITEMKIND='4' ;
select count(ITEMKIND) from ITEM where ITEMKIND='5' ;
select count(ITEMKIND) from ITEM where ITEMKIND='1' ;
select count(ITEMKIND) from ITEM where ITEMKIND='2 ;
select count(ITEMKIND) from ITEM where ITEMKIND='3' ;
select count(ITEMKIND) from ITEM where ITEMKIND='4' ;
select count(ITEMKIND) from ITEM where ITEMKIND='5' ;
select count(ITEMKIND) from ITEM where ITEMKIND in ('1','2','3','4','5');
再问: 兄弟貌似没理解我意思,我的意思是要分别查处1、2、3、4、5的总数,但是sql是一句,谢谢,希望您继续解答
再答: select count(ITEMKIND),'1' from ITEM where ITEMKIND='1' union all select count(ITEMKIND),'2' from ITEM where ITEMKIND='2 union all select count(ITEMKIND),'3' from ITEM where ITEMKIND='3' union all select count(ITEMKIND),'4' from ITEM where ITEMKIND='4' union all select count(ITEMKIND),'5' from ITEM where ITEMKIND='5' ;
再问: 兄弟貌似没理解我意思,我的意思是要分别查处1、2、3、4、5的总数,但是sql是一句,谢谢,希望您继续解答
再答: select count(ITEMKIND),'1' from ITEM where ITEMKIND='1' union all select count(ITEMKIND),'2' from ITEM where ITEMKIND='2 union all select count(ITEMKIND),'3' from ITEM where ITEMKIND='3' union all select count(ITEMKIND),'4' from ITEM where ITEMKIND='4' union all select count(ITEMKIND),'5' from ITEM where ITEMKIND='5' ;
这个能合并成一句吗?select count(ITEMKIND) from ITEM where ITEMKIND='1
select count(distinct b) from X_info where c=1;能放到一个CASE内么 不
SQL >select count(*) from Teacher where teacherCode=? and te
select count(*) as total from ddcm_news where key=a
SQL语句理解 select * from B where (select count(1) as num from A
SELECT COUNT(*) FROM Users WHERE Id={0} AND LoginPwd = '{1}'
这句话我还是看不懂,select count(1) from T_Late where T_Late.Uid = T_W
select count(1) from emp
select * from book where 1=1
select A,B,C,D=(select count(*) from 表 where c=a.a and b=a.b
select count(*) from v$process a,v$session b where a.addr =
select count() into :r_count from zw_kmyeb where km_code lik