0

show fields from table_name
and
show columns from table_name

shows Fields, Type,Null,Key,Default,Extra

enter image description here

But, I want to show only Fields so that I can copy field's name to use another(e.g. inserting data or making csv file because csv file need to have column name in 1st row).

What is the command to view this?

1 Answers1

0
SELECT column_name
FROM information_schema.columns
WHERE  table_name = 'your_table'
AND table_schema = 'database_name'