求一条mssql语句..?? - MS-SQL Server / 基础类
    
	
	求一条mssql语句..??
表 news   
字段dtime 的类型是datetime
我要删除所有 当前服务器时间减去 dtime字段大于5天的记录( getdate()-dtime )>5  得怎么写.请赐教??  
SQL code: 
datediff(dd,dtime,getdate())>5
SQL code: 
select *
from news
where datediff(dd,dtime,getdate())>5
SQL code: 
dtime<dateadd(dd,-5,getdate())
写法要改成这样最好
大哥能不能帮我写完整一点..我也是用到datediff(dd,dtime,getdate())>5 但老是执行不成功 谢谢
SQL code: 
delete news where dtime<dateadd(dd,-5,getdate())
晕
SQL code: 
delete news where datediff(dd,dtime,getdate())>5
这个应该能成功啊
不成功报什么错误?
谢谢.各位..
学习下  有好处的
    
 
	相关问答:
        
    
    sql的软件在哪里可以下啊!在网上找了蛮多都用不了啊
随便搞一D版吧,
迅雷第一个就可以用
2000,2005都这样
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
    
        
    
    如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP 
参考:http://hi.baidu.com/toiota ......
    
        
    
    请问
添加新数据源->数据库->添加连接
这个界面下,数据源选择:Microsoft SQL Server (SqlClient);
服务器名:
应该写什么呢?
有谁知道?多谢各位!!
你到底是要连mysql还是mssql?
引用
请问
 ......
    
        
    
    id                                       url                           rank      ......
    
        
    
    下面是XML初始文件内容
XML code: 
<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/Up ......