I have an SQL statement that has a CASE
from SELECT
and I just can't get it right.
(我有一个SQL语句,它有一个来自SELECT
的CASE
,我无法正确使用它。)
Can you guys show me an example of CASE
where the cases are the conditions and the results are from the cases. (你们能告诉我CASE
一个例子, CASE
是条件,结果来自案例。)
For example: (例如:)
Select xxx, yyy
case : desc case when bbb then 'blackberry';
when sss then 'samsung';
end
from (select ???? .....
where the results show
(结果显示)
name age handphone
xxx1 yyy1 blackberry
xxx2 yyy2 blackberry
ask by fadzli feizal translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…