| Author |
Retrieve MySQL table column names
|
Bryan Scarbrough
Ranch Hand
Joined: Aug 08, 2005
Posts: 49
|
|
|
How can I get the column names from a MySQL table?
|
Bryan Scarbrough<br /> <br />Consistency is the last resort of the unimaginative!
|
 |
Padma Lalwani
Ranch Hand
Joined: Nov 02, 2004
Posts: 49
|
|
Run the query as select *, get ResultSetMetaData from the ResultSet, use getColumnCount to get number of columns and then loop through to get name using getColumnName Padma
|
 |
Bryan Scarbrough
Ranch Hand
Joined: Aug 08, 2005
Posts: 49
|
|
|
Thanks, that was easier than I thought it would be!
|
 |
 |
|
|
subject: Retrieve MySQL table column names
|
|
|