How to select only fieldname when using show columns query in mysql

mysql

Solution

You're trying to determine the table structure? You can query MySQL's `information_schema` database directly for the fieldnames:

select COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME='student';

Problem

I use this query to select fields in a given table. Is it possible to select only the fieldname and not the whole structure of the table? ``` SHOW COLUMNS FROM student ```

Original source