selecting all columns but one

From: blackwater dev <blackwaterdev(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: selecting all columns but one
Date: 2009-07-28 13:12:08
Message-ID: 34a9824e0907280612v737aef45s22e940b1f39c881f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with a lot of columns. One of the columns I want to alias so
have a query of:
select *, column as newname from mytable.

The problem is I now have column and newname in the results. I don't want
to select column by column. How can I do a select * but omit one?

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert James 2009-07-28 13:14:38 Re: Relational Algebra and Aggregate Functions
Previous Message Bjørn T Johansen 2009-07-28 12:48:18 Upgrading from 8.3 to 8.4 and Integer datatimes?