Skip to content
Advertisement

How to show column names in a row

I want to write a SELECT statement to show the list of fields in the table.

Advertisement

Answer

You can use the information schema tables, particularly columns:

Note that this metadata is stored per database. So if you want a table in another database, you need three part naming:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement