selecting multiple like-named columns

From: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: selecting multiple like-named columns
Date: 2002-08-27 21:35:53
Message-ID: 73309C2FDD95D11192E60008C7B1D5BB04C73E87@snt452.corp.bcbsm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Howdy:

Running PostgreSQL 7.2.1 on RedHat Linux 7.2.

Is there a way to do a select for the column
names from a table by using some type of
wild card?

Let's say I have something like column_1, column_2,
other_column_1, other_column_2 ...

[example]

select
column_%,
other_column_%,
from
t_table
;

[/example]

I'm trying to figure out how to get all of the
data from the columns that have similar
names.

Thanks!

-X

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Link 2002-08-27 22:14:02 Re: selecting multiple like-named columns
Previous Message Alvaro Herrera 2002-08-27 21:04:45 Re: pl/pgsql create table