How can I get all the column names from a table in my database?
Thanx.
Printable View
How can I get all the column names from a table in my database?
Thanx.
I have no idea how to handel things with SQL in Java, but I do know this MySQL query returns the column names it's:
"SHOW FIELDS FROM table_name" this is just like an SELECT query.
I hope this helps, for more infomation see: Mysql
-Wesley
...or call getMetaData() from the ResultSet object.