select top 2
CONVERT(varchar(6),a.lastdate,6) as lastdate
,(select name from table_states where ID=a.joblocation ) as locat
,*
from table_jobpost as a
inner join (select *
from table_SuperAdmin as b
inner join table_Renewal as c on b.S_id=c.supid
where **c.proid** in (select [plan]
from table_features
where Fjobs=1)
and c.Payed=1) as aa on a.oid=aa.businessid
where a.status=1
and a.lastdate>GETDATE()
order by startdate desc
在上面的查询中,c.proid
我想要:
select top 1 proid from table_Renewal order by renewalid desc
如何重新排列查询?
现在c.proid
我有不止一个 id.so 它将检查所有 id。我只想检查
select top 1 proid from table_Renewal order by renewalid desc