I have problem with order by clause,
My query is
"select number from table1 order by number asc "
and the output is displaying as
But if we give order by it should display as below only right ?
Please help me why it is not displaying like it. and how to make the statement to display like the second case. Thanks in advance.
The column datatype that you are selecting is not of NUMBER datatype(might be char or varchar2) hence you are getting such result set.
And for this purpose, it is recommended to set datatype of a column appropriately.
For now you can add TO_NUMBER function to column in ORDER BY clause, only if it has data of number type.
Edited by: Ora on 19 Nov, 2012 3:10 AM