select * from A21
where complete = '0'
and datediff(day,indate,getdate()) > 2 -- 两天前
-- and datediff(day,getdate(),indate) > 2 -- 两天后
where complete = '0'
and datediff(day,indate,getdate()) > 2 -- 两天前
-- and datediff(day,getdate(),indate) > 2 -- 两天后
from A21
where comlete = 0 and datediff(day,indate,getdate()) = 2
declare @thistime datetime
set @thistime=getdate()
select * from A21
where comlete=0 and datediff(day,indate,@thistime)>2
ThisTime是java里面得到的一个变量啊,并不是表里的字段来得