摘要: sql常用判断语句1:case when then else end示例一SELECT 学号, 姓名, 等级= CASE WHEN 总学分 IS NULL THEN ‘尚未选课’ WHEN 总学分 < 50 THEN ‘不及格’ WHEN 总学分 >=50 and 总学分<=52 THEN ‘合格’ ELSE ‘优秀’ END FROM XS WHERE 专业名=’计算机’示例二update employeeset e_wage =case when job_level = ’1’ then e_wage*1.08 when job_level = ’2’ then e_wa 阅读全文
posted @ 2012-02-22 13:43 老皆知 阅读(28132) 评论(0) 推荐(0) 编辑