SQL练习2:cast()用法

tb_score(stuid,coid,score)成绩表,查询平均分大于60的所有学生的学号和平均成绩(平均成绩保留2位小数):

select stuid,cast(avg(score) as decimal(10,2)) as avgscore from tb_score order by stuid having avg(score)>60
posted on 2011-09-06 08:34  啊風  阅读(521)  评论(0编辑  收藏  举报