Reputation: 12437
How do I get the name of a column? What's the query for this ?
Thanks.
Upvotes: 3
Views: 142
Reputation: 19862
SHOW COLUMNS
command can be used to retrieve column names in a table
http://dev.mysql.com/doc/refman/5.0/en/show-columns.html
Upvotes: 2
Reputation: 28711
That's a pretty broad context..
You could try something as simple as
describe `table_name`;
Upvotes: 0
Reputation: 9714
DESCRIBE tableName
will give you the names of all the columns in the table.
Upvotes: 0
Reputation: 455030
You can use SHOW COLUMNS which displays information about the columns in a given table.
Upvotes: 0