select * from user_login where convert(varchar(10),getdate(),120)<convert(varchar(10),end_date,120)
试试看
试试看
解决方案 »
- “数据库*****的媒体集有2个家族成员,但只提供了一个~必须提供所有成员
- 一个查询语句
- 三个字段的和 与另一个字段比较,如何处理?
- 重装系统后SQL 2000无法装载与语言相关的资源.C:\Windows\temp\sqlsetup\Bin\Resources\2052\cldtcstp.Rll错误
- 只UPdate其中一行数据????
- 获取具有调用关系的数据库对象脚本
- 请问如何用BULK INSERt语句将Txt的数据文件导入到SQLserver2000的表中,字段按长度区分
- 急求一获取特殊段字符的写法。。
- SQL SERVER 总是连接不到本地数据库
- 问一下这两个方法执行的结果有什么不同
- sql问题:因为有标识列,所以无法从access中导入数据?(急!!!)
- 各位大侠请帮个忙!!!!!
跟原来的一个样子。
create table BB(AA datetime)
insert BB select '2004/09/05'
union all select '2004/09/03'
union all select '2004/09/10'
union all select '2004/10/10'
union all select '2004/10/01'
go
select AA from BB where convert(varchar(10),getdate(),120)<convert(varchar(10),AA,120)(影響 4 個資料列)
--測試
create table BB(end_date varchar(100))
insert BB select '2004-09-02'
union all select '2004-09-03'
union all select '2004-09-10'
union all select '2004-10-10'
union all select '2004-10-01'
go
select * from BB where convert(varchar(10),getdate(),120)<end_date
go
drop table BB--结果
2004-09-10
2004-10-10
2004-10-01