MySQL Получите поля таблицы
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'my_database' AND TABLE_NAME = 'my_table';
Shiny Sheep
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'my_database' AND TABLE_NAME = 'my_table';
/**table's full description*/
SHOW FULL COLUMNS FROM tablename;
SHOW COLUMNS FROM mydb.mytable;
DESCRIBE table_name; # To show table structure...
DESCRIBE my_table;