in语句慢一下,试试下面的:SELECT top 8 A.*,B.*
FROM dbo.Table1 A LEFT JOIN
dbo.Table2 B WITH (NOLOCK) ON A.ID = B.ID
WHERE (B.TypeID between 40 and 46)
or (B.TypeID = 48)
or (B.TypeID between 51 and 53)
or (B.TypeID between 77 and 81)
ORDER BY A.ID DESC,B.TypeID
FROM dbo.Table1 A LEFT JOIN
dbo.Table2 B WITH (NOLOCK) ON A.ID = B.ID
WHERE (B.TypeID between 40 and 46)
or (B.TypeID = 48)
or (B.TypeID between 51 and 53)
or (B.TypeID between 77 and 81)
ORDER BY A.ID DESC,B.TypeID
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货