MySQL Forums
Forum List  »  MyISAM

Re: Reuire the order od data from table that it was inserted in sequence
Posted by: Umesh Shastry
Date: November 17, 2009 10:58AM

Try this...

Quote


create table `ushastry`.`table_name` (
`col1` varchar (50) );
insert into `ushastry`.`table_name` VALUES('Axbo 1')
,('Axbo 2')
,('Axbo 3')
,('Axbo 4')
,('Axbo 5')
,('Axbo 6')
,('Axbo 7'),('Axbo 8'),('Axbo 9'),('Axbo 10'),('Axbo 11'),('Axbo 12'),('Axbo 13');

SELECT col1
FROM `ushastry`.`table_name`
ORDER BY CAST(SUBSTRING_INDEX(col1, ' ', -1) AS UNSIGNED)
;

Regards,
Umesh Shastry
http://www.blogger.com/profile/02551756983528645221

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Reuire the order od data from table that it was inserted in sequence
2251
November 17, 2009 10:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.