Re: insert into help
От | James Kitambara |
---|---|
Тема | Re: insert into help |
Дата | |
Msg-id | 474252.7907.qm@web27908.mail.ukl.yahoo.com обсуждение исходный текст |
Ответ на | Re: insert into help (Guillaume Lelarge <guillaume@lelarge.info>) |
Список | pgsql-sql |
Hello Guillaume Lelarge ! I suggest you try the following question: RE-CREATE YOUR TABLES AS FOLLOW: CREATE SEQUENCE table1_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 10000000 START 1 CACHE 1; CREATE TABLE TABLE1 ( ID INTEGER NOT NULL DEFAULT nextval('table1_id_seq'::regclass) , NAME VARCHAR(200) NOT NULL ); CREATE TABLE TABLE2 ( NAME VARCHAR(200) NOT NULL ); ------------------------INSERTING THE DATA------------------------------ INSERT INTO TABLE1 (NAME) SELECT NAME FROM TABLE2; Note: The ID in Table1 will be generated automaticale because of DEFAULT nextval('table1_id_seq'::regclass) James Kitambara Computer System Analyst and Programmer Bank of Tanzania, P.O. Box 2939, Mobile : +255 71 3307632, Dar es Salaam, Tanzania. --- On Wed, 22/9/10, Guillaume Lelarge <guillaume@lelarge.info> wrote:
|
В списке pgsql-sql по дате отправления: