Advice with an insert query

From: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Advice with an insert query
Date: 2013-06-07 13:58:51
Message-ID: CAAY=A7-4fNtC-6akfvfBw2VmqAS0B5+bVxHktWg2qMztV21KEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I need to insert records into a table where one value is fixed and 2 values
come from a SELECT query, something like the following example:

INSERT INTO table1 fld1, fld2, fl3
VALUES value1, (SELECT fldx, fldy FROM table2)

Is this valid?

Respectfully,
Jorge Maldonado

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Gaab 2013-06-07 14:01:19 Re: Advice with an insert query
Previous Message Jayadevan 2013-06-05 04:24:01 Re: crosstab help