Search Postgresql Archives

create table as select... with auto increment id ?

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

 




We all know i can

create table freaky as select "abunchofstuff".

I work with rails developers and they are fussy about having an
auto incrementing "id" field.  Is there a way I can eak that out
of the above type statement, or am I stuck with creating the
table and no short cuts?

create table freaky ( id autoincrement, and-a-long-list int, and-perfect-order float )
insert into freaky as select "abunchofstuff-in-same-order"

I think I know the answer ;-<

Thanks for any info,

-Dave


--
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