課程
/數(shù)據(jù)庫
/Oracle
/Oracle高級查詢
oracle中能用case then 嗎?
2016-08-14
源自:Oracle高級查詢 5-5
正在回答
select ci.ci_id CID,wm_concat(case when instr(stu_ids,stu.stu_id) > 0 then stu.stu_name end) SNAMEfrom pm_ci ci,pm_stu stugroup by ci.ci_id
有case……when?
case 字段名 when 值 then 結(jié)果(else 結(jié)果)end
eg:selct username ,case username when 'aaa'then '計算機(jī)'else '其他' end as 部門 from emp
或者
case when 列名=值 then 結(jié)果 else結(jié)果 end from 表名。
舉報
數(shù)據(jù)庫開發(fā)中應(yīng)用廣泛的高級查詢,本教程通過大量的案例詳細(xì)講解
3 回答左外連接和右外連接是否可以互換呢?
1 回答這個聯(lián)系的答案是什么,能說一下嗎
2 回答為啥我輸出ed沒能成功呢
1 回答請問下這個表行轉(zhuǎn)列的語句該怎么寫呢?
3 回答oracle 能用 left join 和 right join嗎?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-09-03
select ci.ci_id CID,wm_concat(case when instr(stu_ids,stu.stu_id) > 0 then stu.stu_name end) SNAME
from pm_ci ci,pm_stu stu
group by ci.ci_id
2016-08-17
有case……when?
case 字段名 when 值 then 結(jié)果(else 結(jié)果)end
eg:selct username ,case username when 'aaa'then '計算機(jī)'else '其他' end as 部門 from emp
或者
case when 列名=值 then 結(jié)果 else結(jié)果 end from 表名。