I need to select the records wit columns in reverse order table structure.
For Example,
If My table struture is like this
class name rank
------ ---------- ------
A Nija 2
D cruz 3
B Antony 4
C silverster 5
A febin 1
means I want the result as
rank name class
------ ---------- ------
2 Nija A
3 cruz D
4 Antony B
5 silverster C
1 febin A
you can say that select the columns like rank,name,class. But My Table columns will increase in dynamically. I want the result if my table contains any number of columns but the result should be in reverse of the table structure. Here i ll select all columns only.
try this:
SQL FIDDLE DEMO