Обсуждение: How to find a column name

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

How to find a column name

От
lrnr
Дата:
Hi,

Is there in Postgresql something like the all_tab_columns table in
ORACLE? How can I find if a column name exists in the database?

For example, I want to find all columns that have a name containing the
string 'USER', in any table. How can I do this?


--
lrnr

Re: How to find a column name

От
Peter Eisentraut
Дата:
lrnr wrote:
> For example, I want to find all columns that have a name containing
> the string 'USER', in any table. How can I do this?

SELECT * FROM information_schema.columns WHERE column_name LIKE
'%USER%';

--
Peter Eisentraut
http://developer.postgresql.org/~petere/