Check out example codes for "MySql get fields of table". It will help you in understanding the concepts better.

Code Example 1

SHOW COLUMNS FROM mydb.mytable;

Code Example 2

DESCRIBE my_table;

Code Example 3

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

Learn ReactJs, React Native from akashmittal.com