insert only if conditions are met?

From: Henry Ortega <juandelacruz(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: insert only if conditions are met?
Date: 2005-08-31 15:09:54
Message-ID: 2bffcc33050831080942f806e1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Is there a way to insert a record only if a certain
condition is met?

Something like:
insert into employee values('lastname','firstname',8) where
(condition here.. select sum(ofsomething) from xx where sum(ofsomething)>0 )

Is this possible at all with just plain SQL?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joost Kraaijeveld 2005-08-31 15:14:08 Re: [SQL] How do I copy part of table from db1 to db2
Previous Message Joost Kraaijeveld 2005-08-31 15:02:17 Re: [SQL] How do I copy part of table from db1 to db2