年龄在20-40之间的人员:
select * from employees where datediff(year,birthdate,getdate()) > 20 and datediff(year,birthdate,getdate()) <= 40年龄在40以上的人员:
select * from employees where datediff(year,birthdate,getdate()) > 40如何向一个表的某一列插入数据?
你的意思是更新么?如是,则类似这么做,
update employees set photopath = 'http://www.csdn.net/images/csdn.gif' where EmployeeID = 1否则
insert into employees (photopath) values('http://www.csdn.net/images/csdn.gif')