Thread: how to output column names

how to output column names

From
"Michael Dengler"
Date:
Hi,

Is there a query I can perform (perhaps on a system table) to return all of the column names  (ONLY the column names) for a given DB? (I seem to remember doing this before but cant remember how)

Thanks

Mike

Re: how to output column names

From
Jon Sime
Date:
Michael Dengler wrote:
> Hi,
>
> Is there a query I can perform (perhaps on a system table) to return all
> of the column names  (ONLY the column names) for a given DB? (I seem to
> remember doing this before but cant remember how)
>
> Thanks
>
> Mike
>

The 'columns' view in information_schema should do the trick for you.

-Jon

--
Senior Systems Developer
Media Matters for America
http://mediamatters.org/

Re: how to output column names

From
"Michael Dengler"
Date:
Perfect! thanks for the help!.

Mike


On 4/19/07, Jon Sime <jsime@mediamatters.org> wrote:
Michael Dengler wrote:
> Hi,
>
> Is there a query I can perform (perhaps on a system table) to return all
> of the column names  (ONLY the column names) for a given DB? (I seem to
> remember doing this before but cant remember how)
>
> Thanks
>
> Mike
>

The 'columns' view in information_schema should do the trick for you.

-Jon

--
Senior Systems Developer
Media Matters for America
http://mediamatters.org/