T-SQL语句学习(一)
SQL中case语句的使用:
1 use TeachingManageSYS
2 go
3 select *,
4 case when Sage>=20 then '成人'
5 when Sage<20 then '少年'
6 else 'hard'
7 end FrenightType
8 from StudentInfo
9 where Ssex='男'
10 order by FrenightType asc
11 go
本博客内容,如需转载请务必保留超链接。Contact Me:Mail此处省略好几个字...