Default sort order for a select query in SQL Server 2005 and SQL Server 2012
问题 Is there a difference between default sort order for a select query in SQL Server 2005 and SQL Server 2012? I have a table variable without a primary key. When I execute a select query on the table variable in SQL Server 2005, the records are selected and displayed in alphabetical order as per one of the columns. In SQL Server 2012, the records are displayed in the same order as in the parent table. 回答1: There is no default sort order. Unless you specify it in the ORDER BY clause, there is no