Thread: how to output column names
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
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
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/
Perfect! thanks for the help!.
Mike
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/