課程
/數據庫
/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 結果(else 結果)end
eg:selct username ,case username when 'aaa'then '計算機'else '其他' end as 部門 from emp
或者
case when 列名=值 then 結果 else結果 end from 表名。
舉報
數據庫開發中應用廣泛的高級查詢,本教程通過大量的案例詳細講解
3 回答左外連接和右外連接是否可以互換呢?
1 回答這個聯系的答案是什么,能說一下嗎
2 回答為啥我輸出ed沒能成功呢
1 回答請問下這個表行轉列的語句該怎么寫呢?
3 回答oracle 能用 left join 和 right join嗎?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
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 結果(else 結果)end
eg:selct username ,case username when 'aaa'then '計算機'else '其他' end as 部門 from emp
或者
case when 列名=值 then 結果 else結果 end from 表名。