Insert based in a select

From: "Ezequias Rodrigues da Rocha" <ezequias(dot)rocha(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Insert based in a select
Date: 2007-02-25 00:06:46
Message-ID: 55c095e90702241606x4d15b7a9v5b084e575ef23140@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi list,

Could someone help me with this problem

I have a table like this

Master table

id number
10 9898398398
20 9938378390
30 9873636736

and I want to make an insert into a table with this structure:

Secondary table

id(sequence), master_id
1 10
2 20
3 30

It is possible to make this insert based in all records of my master table ?

Any help would be very welcomed.

Best Regards
Ezequias

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Phillip Smith 2007-02-25 01:23:15 Re: Insert based in a select
Previous Message Ezequias Rodrigues da Rocha 2007-02-24 23:37:15 Change a field to sequence (serial)