SQL语句出问题了,大家帮我看看!谢谢了.
select s_number as 学号,
s_name as 姓名,
sex as 性别,
--year(getdate())-year(birthday) as 年龄
from t_student
where year(getdate())-year(birthday)<=25 and sex='男'
我想得到25岁以下的性别为男的结果.出错了.帮看一下.
where year(getdate())-year(birthday)<=25 and sex='男'这句有问题.我怎么改呀!