MySQL Show Columns
The easiest way to get the column names of a MySQL table is the following:
SQL:
-
SHOW COLUMNS FROM `table`
This will actually get you column/field names, type, key, null, extra and default values as well. A classic implementation of this would be to export a table to csv or something where you wanted to list the column names once at the top, then spin through the records and output them into a file.
PHP:
-
-
-
-
}
Home | MySQL | MySQL Show Columns
You’re currently reading “ MySQL Show Columns ,” an entry on BRADINO
- Published:
- 5.31.07 / 4pm
- Category:
- MySQL












