
October 12th, 2012, 09:51 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 2
Time spent in forums: 26 m 19 sec
Reputation Power: 0
|
|
|
Order by for String numbers
Hi,
I am having following values in class_name column of the student table.
5th,6th,7th,8th,9th,10th.
But when I write following query:
Code:
select class_name from student order by class_name
It returns as:
10th
5th
6th
7th
8th
9th
But I want the O/P as below:
5th
6th
7th
8th
9th
10th
Please help me.
Thanks in Advance...!!
Last edited by Guelphdad : October 12th, 2012 at 10:24 AM.
Reason: swapped code for mysql in display
|