views:

13

answers:

1

How to arrange values in ascnding order when single row is there...i mean i have only one row in my table for example

prashanth 6 1 3 2 4 5 ...can we annage these velues in ascending order?... only one row is in the table.row number is 1....and we have 6 columns how can we arrange in ascending order..the values should come like this 6 5 4 3 2 1.. i mean that the row values should be in a particular order....when we have one row the row values should be in particular order..... that's what i am asking

A: 

If you only have one row, what is there to sort?

When selecting several rows, you can use an ORDER BY clause to sort them:

SELECT myFirstColumn, mySecondColumn
FROM myTable
ORDER BY mySecondColumn

If you want the columns in a specific order, when writing your select statement simply state the columns in the order you want:

SELECT myFirstColumn, mySecondColumn
FROM myTable
Oded