MySQL Forums
Forum List  »  Perl

This will give column names only
Posted by: Dvd Avins
Date: December 22, 2011 09:39AM

A few years ago, someone asked how to get a list of column names of a table and I don't think any of the supplied answers gave just the list, rather than additional information. That's what he was looking for. It can be done by:

SELECT column_name from information_schema.columns where table_schema = "your_database_name" and table_name = "your_table_name";

The old topic as at,158277,158277

Edited 1 time(s). Last edit at 12/22/2011 10:14AM by Dvd Avins.

Options: ReplyQuote

Written By
This will give column names only
December 22, 2011 09:39AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.