mysql show table fields
snippet in sql

get the mysql table columns data type mysql

user5501

SHOW COLUMNS FROM mydb.mytable;

MySql get fields of table

user8969

SELECT COLUMN_NAME
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE TABLE_SCHEMA = 'my_database' AND TABLE_NAME = 'my_table';

mysql show table fields

user9965

DESCRIBE my_table;