Martin Jakob
What will be the result of this query. select * from TableName order by 1 . Will this query throw an error?
By Martin Jakob in SQL Server on Dec 16 2006
  • Manish Dwivedi
    Dec, 2006 16

    The query you have written will not throw an error but in some cases this query can throw error. This query will give all the records which is in sorting order in respect of the column 1.

    Suppose you have written query like this:
    Select ProductId , ProductName from ProductMaster order by 3

    In that case this query will throw error because there is only two column in the table an we want to order the result by the third column.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS