22,209
社区成员
发帖
与我相关
我的任务
分享
where iSysCode in( select iSysCode ....
select * from T a where 状态='0' and exists(select 1 from T where 状态='0' and 级号 like a.级号+'%' )
select * from T a where not exists(select 1 from t where a.级号 like rtrim(级号)+'%' and 状态=1)