码迷,mamicode.com
首页 > 数据库 > 详细

SQL_根据不同条件进行更新

时间:2014-10-06 01:36:09      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   sp   div   c   log   r   bs   

update Students set chineseLevel = 
case
when chinese < 60 then D
when 60<=chinese and chinese <70  then C
when 70<=chinese and chinese <80 then B
when chinese >= 80 then A
end

 

SQL_根据不同条件进行更新

标签:style   blog   color   sp   div   c   log   r   bs   

原文地址:http://www.cnblogs.com/zwhFighting/p/4007816.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!