order by clause with multiple columns

  • i was totaly confused while using order by clause with multiple columns..

    actually how it will respond any one please give an idea...

    Thanks

    Prasad

  • Hi Dilip,

    don't worry. Suppose if you have 4 columns col1, col2, col3 & cols & you use:

    order by col1, col2, col3, col4

    then sql server first orders by col1,

    then col2

    then col3

    then col4

    means if col1 has some rows which have same value, the sql server arrange the results by col2.

    means precedence left to right.

  • Thanks u very much...:-)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply