Insert based in a select - Mailing list pgsql-sql

From Ezequias Rodrigues da Rocha
Subject Insert based in a select
Date
Msg-id 55c095e90702241606x4d15b7a9v5b084e575ef23140@mail.gmail.com
Whole thread Raw
Responses Re: Insert based in a select  (Phillip Smith <phillip.smith@weatherbeeta.com.au>)
List 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


pgsql-sql by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Change a field to sequence (serial)
Next
From: Phillip Smith
Date:
Subject: Re: Insert based in a select