Tag Archives: column name

Mysql show only column names

2 type of sql to show only column name

1.   SELECT column_name
FROM information_schema.columns
WHERE table_schema = ‘DBNAME’
AND table_name = ‘TABLENAME’;

 

2.  SELECT column_name
FROM information_schema.columns
WHERE table_name = ‘TABLENAME’

 

Ref: stackoverflow.com

Advertisements