I am using MySQL 5.0.
I have table with following structure and data.
CREATE TABLE `test`
(
`text1` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `test` (`text1`)
VALUES ('ABC'), ('PQR'), ('XYZ'), ('LMN');
I want to display following output:
Index Text
1 ABC
2 LMN
3 PQR
4 XYZ
In table structure, I don’t want to create any new column.
How can I write a SQL query or a stored procedure to accomplish this?
Thanks in advance.
1 Answer