mysql show all columns from table code example
Example 1: MySql get fields of table
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'my_database' AND TABLE_NAME = 'my_table';
Example 2: mysql all columns
-- MySQL
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS;