(select min(tblTmp.sortID ) from (select top 3 sortID from Product as a,Company as b where a.CompanyID=b.id and a.keyword='lunan' and a.IfPublish=1 and a.Status=3 and b.IfShield=0 and b.Authentication=3 order by sortID desc) as tblTmp) (select min(tblTmp.ID) from (select top 3 sortID ,ID from Product as a,Company as b where a.CompanyID=b.id and a.keyword='lunan' and a.IfPublish=1 and a.Status=3 and b.IfShield=0 and b.Authentication=3 order by sortID desc) as tblTmp)
from (select top 3 sortID
from Product as a,Company as b
where a.CompanyID=b.id and a.keyword='lunan' and a.IfPublish=1 and a.Status=3 and b.IfShield=0 and b.Authentication=3
order by sortID desc) as tblTmp)
(select min(tblTmp.ID)
from (select top 3 sortID ,ID
from Product as a,Company as b
where a.CompanyID=b.id and a.keyword='lunan' and a.IfPublish=1 and a.Status=3 and b.IfShield=0 and b.Authentication=3
order by sortID desc) as tblTmp)
1楼对了。谢谢了。。结贴了。。