MySQL Forums
Forum List  »  Knowledge Base

Re: Urgent -Search column name by column number
Posted by: Paul Svirin
Date: October 06, 2009 04:36AM

Run this one (this is an example):

mysql> select column_name from INFORMATION_SCHEMA.columns WHERE table_schema='test' and table_name='tbl1' and ordinal_position=1;
| column_name |
| id |
1 row in set (0.01 sec)

Then read about dynamic SQL in MySQL at :

StarWind Software developer ( )

Options: ReplyQuote

Written By
Re: Urgent -Search column name by column number
October 06, 2009 04:36AM

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.