No products are associated with this question.
There is no way that I know of to return the column names along with the data of those columns. (It would be a bit odd to do so, since the names and data may be of different types.)
You can query the metadata of the database to get column names. For example, in postgresql you can write
SELECT attname , typname FROM pg_attribute , pg_type WHERE typrelid=attrelid AND typname = 'table_name' ;
to find the columns for the table named table_name.
Play games and win prizes!Learn more