how to output column names

Поиск
Список
Период
Сортировка
Искать

how to output column names

От:
"Michael Dengler" <michael.dengler@gmail.com>
Дата:
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

От:
Jon Sime <jsime@mediamatters.org>
Дата:
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

От:
"Michael Dengler" <michael.dengler@gmail.com>
Дата:
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/

FAQ