kuldip.bhatt (1/20/2009)
so if Primary key then there no solution for the DBCC COmmand
I dont think i understood what you mean here...
i can't use Order by in Sub Query.
is there any mechansium that i use order by desc and top in the sub Query
You can use both ORDER BY and TOP in a sub query. You can also use only TOP in the subquery. You cannot use only ORDER BY in a subquery.
Quoting from BOL
When ORDER BY is used in the definition of a view, inline function, derived table, or subquery, the clause is used only to determine the rows returned by the TOP clause. The ORDER BY clause does not guarantee ordered results when these constructs are queried, unless ORDER BY is also specified in the query itself.