{"id":149,"date":"2012-04-16T13:00:00","date_gmt":"2012-04-16T13:00:00","guid":{"rendered":"https:\/\/sqlserverlearner.azurewebsites.net\/2012\/04\/16\/what-are-the-maximum-number-of-columns-in-order-by-clause-in-sql-server\/"},"modified":"2012-04-16T13:00:00","modified_gmt":"2012-04-16T13:00:00","slug":"what-are-the-maximum-number-of-columns-in-order-by-clause-in-sql-server","status":"publish","type":"post","link":"https:\/\/sqlserverlearner.com\/2012\/04\/16\/what-are-the-maximum-number-of-columns-in-order-by-clause-in-sql-server\/","title":{"rendered":"What are the maximum number of Columns in ORDER BY clause in SQL Server?"},"content":{"rendered":"
table.hovertable {
\nfont-family: verdana,arial,sans-serif;
\nfont-size:11px;
\ncolor:#333333;
\nborder-width: 1px;
\nborder-color: #999999;
\nborder-collapse: collapse;
\n}
\ntable.hovertable th {
\nbackground-color:#c3dde0;
\nborder-width: 1px;
\npadding: 8px;
\nborder-style: solid;
\nborder-color: #a9c6c9;
\n}
\ntable.hovertable tr {
\nbackground-color:#d4e3e5;
\n}
\ntable.hovertable td {
\nborder-width: 1px;
\npadding: 8px;
\nborder-style: solid;
\nborder-color: #a9c6c9;
\n}<\/p>\n
What are the maximum number of Columns in ORDER BY clause in SQL Server?
\nThe maximum number of Columns in ORDER BY clause are Limited only by number of bytes.
\n
\nBelow link gives details regarding maximum bytes per ORDER BY Clause.
\nWhat are the maximum Bytes per ORDER BY in SQL Server?<\/a><\/p>\n
Max Capacity For<\/th>\n | SQL Server 2012<\/th>\n | SQL Server 2008 R2<\/th>\n | SQL Server 2008<\/th>\n | SQL Server 2005<\/th>\n<\/tr>\n |
---|---|---|---|---|
\nmaximum number of Columns in ORDER BY clause in SQL Server\n<\/td>\n | \nLimited only by number of bytes.\n<\/td>\n | \nLimited only by number of bytes.\n<\/td>\n | \nLimited only by number of bytes.\n<\/td>\n | \nLimited only by number of bytes.\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n |