select column_name, data_type, character_maximum_length from information_schema.columnswhere table_name = 'table_name'
If you need the names in an excel row, I will recommend the following:
- Perform the query above
- Copy the column with the names in a textpad
- Replace character \n with ,
- Save the file with extension .csv
- Open the .csv file with Excel
- Copy and paste the headers (which should be each name in each cell) to wherever you need them
No comments:
Post a Comment