1.查询所有学生信息,性别为男的同学,显示为“男同学”,性别为女的,显示为“女同学”
select *,case sex when '男' then '男同学' when '女' then '女同学' else '其他'end as a from dbo.s
数据库表s,c,sc截图请到:http://www.cnblogs.com/fuge/archive/2012/03/16/2400913.html
1.查询所有学生信息,性别为男的同学,显示为“男同学”,性别为女的,显示为“女同学”
select *,case sex when '男' then '男同学' when '女' then '女同学' else '其他'end as a from dbo.s
数据库表s,c,sc截图请到:http://www.cnblogs.com/fuge/archive/2012/03/16/2400913.html