Thread: select as
View Single Post

   
  #3 (permalink)  
Old 04-08-2008, 06:35 PM
Greg Stark
 
Posts: n/a
Default Re: select as


Bambero <bambero@tlen.pl> writes:

> I don't know what fields are in the table so:
>
> select fieldname as 1, fieldname2 as 2
>
> is useless.


slo=> create table x (foo text,bar text,baz text);
CREATE TABLE
slo=> select * from (select * from x) as x ("1","2","3");
1 | 2 | 3
---+---+---
(0 rows)

--
greg


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote