年龄在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')
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')
解决方案 »
- 选出比现在时间超过24小时的sql怎么写啊?
- 这是怎么回事啊?在线等待 急!!!!!!!!!!!
- 多表连接的问题
- sql server什么地方记录用户的操作信息!
- 一个SQL语句的构建,请大家帮忙出主意,分数不够可以再加
- treeview控件的问题
- 问邹建两个小问题!希望帮忙解决(关于邹建的SQL语句)
- 谁想拉 "Microsoft SQL Server 2000 简体中文版 4 In 1",请进! (内详)
- 大家帮我看看,这个东西在数据库里怎么存储比较好?
- 我想手动更新一个表里的一个timestamp类型的数据为15年12月31该怎么办呢
- 请高手指点!!!
- 我的应用程序如果两个或多个同时操作SQL SERVER7.0时为什么老是会出现死机情况??急!
select * from employees where datediff(year,birthdate,getdate()) between 20 and 40