create table hu(
Name varchar2(22),
sal number
);
select * from hu;
insert into hu values('java',2300);
insert into hu values('shenzhen,6000);
insert into hu values('huhu',6700);
insert into hu values('huhu',670);
insert into hu values('jia,1800);
--------------------------------------------------------
select h.* ,
case
when sal<2000 THEN 'NO'
else '不錯'
end as stu from hu h;
------------------------------------------------------
语法:
case where then end
连着一起用。 else 是可选的。