2011-04-26 224 views

回答

4

嘗試是這樣的:

WITH CTE AS 
(
SELECT DISTINCT TOP(30) X.ID, X.CREATE FROM X INNER JOIN Y ON X.ID = Y.ID 
) 
SELECT *, ROW_NUMBER() OVER (ORDER BY Create DESC) AS LIMIT 
FROM CTE 

您必須在查詢中插入CREATE