tsql - Is there a "Default Order By Column" in SQL Server? -
when execute query select col1, col2, col3 table, gets sorted primary key ascending.
i'm wondering if there way specify different column, order createddate desc if there no order clause?
i doubt (since unintuitive, wondering anyway.
no. ordering see artifact of query optimizer's strategy. relational theory forbids there implicit ordering of set of data.
you can't count on same ordering next time same query because optimizer strategy depends on context , data might change.
Comments
Post a Comment