CASE a WHEN 1 THEN b ELSE NULL END
问题描述:
CASE a WHEN 1 THEN b ELSE NULL END
答
SELECT CASE '张三' WHEN '张三' THEN '张三' ELSE NULL END-- 如果 '张三' 值是 '张三' 那么返回 '张三' 否则 返回NULL值-- 如果(CASE) '张三' 值是(WHEN) '张三' 那么返回(THEN) '张三' 否则(ELSE) 返回NULL值 (EN...
相关推荐
- 关于连词、复合从句的选择题1.He was walking on the pavement ________ a bike suddenly hit him from behind.A.while B.then C.when D.since2.You will end up in hospital ________ you don't give up smoking.A.until B.as C.unless D.if3.Get up early and do exercise every day,________ you won't have a strong body.A.but B.for C.and D.or4.He was so excited ________ he couldn't say a word at that moment.A.because B.that C.after D.before5.Could you please tell us ________?A.whent
- 求详解几道英语单选题 谢谢我手头有正确答案重要的是 请帮忙的朋友附上解释 感激不尽!1.several had passed___the puzzled travelers came to understand what was going on.A. after B. when C. before D. until2. ___is always the case, the darkest hour comes before the dawn.A. That B. It C.As D. What3. Bob said proudly that he had achieved all his goals, not in spite of his handicap, but ___it.A. owing to B. due to C. because of D. on account of3. A. owing to B. due to C. because of 这道题选的B
- sql语句 case when or 自己写的sqlselect date_format(createDate,'%Y-%m-%d') as createDate,count(case when reqtype='runUp' then imei end) as runUp,count(case when (reqtype='login' or reqtype='register') then imei end) as loginFROM (select distinct imei,date_format(createDate,'%Y-%m-%d') as createDate,reqtypefrom stat_user_loginreq_201312 where 1=1 and DATE_FORMAT(createDate,'%Y-%m-%d') = '2013-12-01' ) AS g group by DATE_FORMAT(createDate,'%Y-%m-%d') order by
- 1.Xiao Wang meets Peter at the airport and says to him:“Morning,Peter!” In this case,the source of information is ________ .\x0b A.Xiao WangB.PeterC.the airportD.“Morning,Peter!”3.Utterance meaning in a face-to-face communication refers to _________.A.what the speaker has intended to convey in what is saidB.what what is said normally meansC.what the hearer has understood on the basis of what is saidD.the associative meaning words have4.When we are in
- 英语翻译1.In the spoken English of some areas in the US.the"r" sounds at the end of the words___A.are dropped B.drop C.are being dropped D.have dropped2.As a new graduate,he doesn't know__it takes to start a business here.A.how B.what C.when D.which3.The living room is clean and tidy,with a dining table already ___for a meal to be cooked.A.laid B.laying C.to lay D.being laid
- SQL语句case whenselect trunc(date '2009-01-01','dd') as date_id, b.org_id as org_id, b.risk_id as risk_id, sum(a.planfee-nvl(c.payreffee,0)) , (case when to_char(statistic_date-payrefdate>=0) and to_char(statistic_date-payrefdate<90) then sum(a.planfee-nvl(c.payreffee,0)) else '' end), (case when to_char(statistic_date-payrefdate>=90) and to_char(statistic_date-payrefdate<180) then sum(a.planfee-nvl(c.pay
- 英语冠词单选1.Many people agree that __ knowledge of English is a must in __international trade today.A.a,\ B.the,an C.the,the D.\,the2.Parer money was in __ use in China when Marco Polo visited the country in __ thirteenth century.A.the,\ B.the,the c.\,the D.\,\3.The sign read"In case of __ fire,break the glass and push __ redbutton"A.\,a B.\,the C.the,the D.a,a
- sql case when 老是语法报错,请问语法哪错了?SELECT zhu.mingzi,zhu.riqi,zhu.liucheng,zhu.xinghao,zhu.shuliang,casewhen [liucheng] = '点装' then '1'when [liucheng] = '装脚' then '2'when [liucheng] = '只装' then '3'when [liucheng] = '点胶' then '4'when [liucheng] = '切腿' then '5'when [liucheng] = '电测' then '6'when [liucheng] = '全检' then '7'else '8' end AS dj[shuliang]*[danjia] AS zongjiaFROM danjia,zhu;
- 3个英语选择题,请给出正确答案?1.Mother asked me to take more money _______ something unexpected should happen.A.in case B.so thatC.in order that D.when2.“When did he leave the classroom?” “He left _______ you turned back to write on the blackboard.”A.the time B.the momentC.until D.since3.I learned that he was _____ sick leave from a government office.A.on B.in C.taken D.spending
- 1.Nobody noticed the thief slip into the house because the lights happened to ___A.be put up B.give in C.be turned on D.go out 2.The new bridge __ by the end of last month A.has been designed B.had been designed C.was designed D.would be designed3.When part of a pencil is in a glass of water,it looks as if it__A.breaks B.has broken C.was broken D.had been broken
- 的长方体,侧面展开后恰好是一个边长为8厘米的正方形.这个长方体的体积是【 】立方厘米
- 海底两万里摘抄600字,