dfd 一二
mysql2: select distinct top 10 * from (select distinct row_number() over (order by cname) as RowNumber, * from (select DISTINCT p.* from products p, prodcategories cc, categories c where cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid AND p.cname like N'Y%' AND (p.hide = 0 or p.hide is null) and (p.customermatch is null or p.customermatch = '') and (p.loggedin = 0 or p.loggedin is null) and (c.customermatch is null or c.customermatch = '') and (c.loggedin = 0 or c.loggedin is null) AND (p.higherCatalogId is null) ) as d) as queries where (RowNumber <= 10 AND RowNumber >= 1)