CREATE TABLE AS SELECT....
От | Arash Zaryoun |
---|---|
Тема | CREATE TABLE AS SELECT.... |
Дата | |
Msg-id | s149c5fe.029@cbc.ca обсуждение исходный текст |
Ответы |
Re: CREATE TABLE AS SELECT....
|
Список | pgsql-sql |
Hi All, I have a table which has 'SERIAL' datatype. When I use 'create table X as select * from my-table' , it creates the table but without serial datatype. I mean without implicit sequence. test=> \d qptuser Table "public.qptuser" Column | Type | Modifiers -----------+-----------------------+----------------------------------------------------------srl | integer | not null default nextval('public.qptuser_srl_seq'::text)login_nme | character varying(35) | not nullpassword | character varying(30) | notnull Indexes: "pk_qptuser" primary key, btree (srl) "i1_qptuser_login_nme" unique, btree (login_nme) test=> create table x as select * from qptuser; test=> \d x Table "public.a" Column | Type | Modifiers -----------+-----------------------+-----------srl | integer |login_nme | character varying(35) |password | character varying(30) | Can you help me on this? Thanks, - Arash
В списке pgsql-sql по дате отправления: