![]() ![]() |
|
![]() ![]() ![]() ![]() |
|
![]() |
![]() 18.20 How to change the order of columns in a tableThe whole point of SQL is to abstract the application from the data storage format. You should always specify the order in wish you wish to retrieve your data. For example: SELECT col_name1, col_name2, col_name3 FROM tbl_name;
will return columns in the order SELECT col_name1, col_name3, col_name2 FROM tbl_name;
will return columns in the order
You should NEVER, in an application, use If you want to change the order of columns anyway, you can do it as follows:
|