Search Postgresql Archives

Re: selecting all columns but one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



blackwater dev, 28.07.2009 15:12:
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?

You need to list all columns that you want explicitely.
Using SELECT * in a production application is considered bad practice anyway

Thomas


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux