22,207
社区成员
发帖
与我相关
我的任务
分享
select top 12 Product.ID
into #T
from Product inner join ProductSort on ProductSort.SID=Product.SID
where lang=1 and isVip=0
order by ctime desc
select top 12 t.* from (
select Product.ID,Product.SID,Product.colorBoxL,smallimageurl,htmlurl,imageurl,Product.name,Product.nameEn,
isCreate,readcount,number,UnitCost,rebateCost,ProductSort.url,ProductSort.dir,ctime,video,hasCost,isVip,lang
from Product inner join ProductSort on ProductSort.SID=Product.SID
where 1=1 and lang=1 and isVip=0
) T
where T.id not in (select id from #T)
order by ctime desc
drop table #T