Mysql show table columns,Get table column names in mysql,Get all columns in perticular mysql table.

SHOW COLUMNS displays information about the columns in a given table. 
It also works for views


Syntax:

SHOW COLUMNS FROM TableName;
SHOW COLUMNS FROM tbl_name
[LIKE 'wild']
SHOW COLUMNS FROM purchaseentry;
Result:


OR
DESCRIBE purchaseentry;
Result:

OR
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE 
TABLE_SCHEMA = 'nglpothysaccounts' AND TABLE_NAME = 'purchaseentry';
Result:

Post a Comment

0 Comments