pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Insert based in a select
Date: Sat, 24 Feb 2007 21:06:46 -0300
Message-ID: <55c095e90702241606x4d15b7a9v5b084e575ef23140@mail.gmail.com> (raw)

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



view thread (6+ messages)  latest in thread

Message-ID: <55c095e90702241606x4d15b7a9v5b084e575ef23140@mail.gmail.com>
Permalink:  ../55c095e90702241606x4d15b7a9v5b084e575ef23140@mail.gmail.com/
Also on:    postgresql.org/message-id/55c095e90702241606x4d15b7a9v5b084e575ef23140@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ezequias.rocha@gmail.com
  Subject: Re: Insert based in a select
  In-Reply-To: <55c095e90702241606x4d15b7a9v5b084e575ef23140@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox