这条SQL语句怎么写? select t1.* from A t1 ,A t2where t1.id = t2.id-1 and datediff(dd,t2.D,t1.D) > 90 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select a.* from 表 a where ( select datediff(day,D,a.D) from 表 where id=a.id-1)>90 select t1.* from A t1 ,A t2where t1.id = t2.id+1 and datediff(dd,t2.D,t1.D) > 90 如果ID 不边续select t2.*from A t1 ,A t2where t1.id=(select top 1 id from t1 where id<=t2.id order by id) and datediff(day,t1.D,t2.D) > 90 如果ID 不边续,改一点select t2.*from A t1 ,A t2where t1.id=(select top 1 id from t1 where id<t2.id order by id) and datediff(day,t1.D,t2.D) > 90 select t.* from A t where exists(select 1 from A where id=(t.id-1) and datediff(d,D,t.D)>90) select idfrom 表 awhere a.d - (select top 1 d from 表 where d < a.d order by d desc) > 90 select *from A表 Twhere datediff(day,(select max(D) from A表 where D < T.D),D) > 90 sql语句,高手进 SQL语句排序问题 sqlserver中有没有和oracle中的pl/sql devloper类似的维护程序,用来调试存储过程等? 求一条SQL,分组取前N条数据,不会写,具体见内容 请问现在只有期初数表和每次提货表的情况下如何算每次的结余数? matlab的问题,为什么画出iac与t的图形得不到正确的答案,啊啊啊啊崩溃了,速救 小的想要一本介绍SQL SERVER的书,请各位帮忙 怎样随机取记录? 求一sql语句?在线等待 error 0064(42000)错误 送分,简单的问题,忘了,在线等 求助:sql字符串处理函数。
select t1.* from A t1 ,A t2
where t1.id = t2.id+1 and datediff(dd,t2.D,t1.D) > 90
select t2.*
from A t1 ,A t2
where t1.id=(select top 1 id from t1 where id<=t2.id order by id)
and datediff(day,t1.D,t2.D) > 90
select t2.*
from A t1 ,A t2
where t1.id=(select top 1 id from t1 where id<t2.id order by id)
and datediff(day,t1.D,t2.D) > 90
t.*
from
A t
where
exists(select 1 from A where id=(t.id-1) and datediff(d,D,t.D)>90)
from 表 a
where a.d - (select top 1 d from 表 where d < a.d order by d desc) > 90
from A表 T
where datediff(day,(select max(D) from A表 where D < T.D),D) > 90