Re: INSERT only under certain conditions (SELECT) - Mailing list pgsql-sql

From Rajesh Kumar Mallah.
Subject Re: INSERT only under certain conditions (SELECT)
Date
Msg-id 200207081342.39151.mallah@trade-india.com
Whole thread Raw
In response to INSERT only under certain conditions (SELECT)  (Joachim Trinkwitz <jtr@uni-bonn.de>)
List pgsql-sql
create an uniq index on the columns,

# create unique index index_name on table (col1,col2,col3,...)


hope it helps.


regds
mallah

On Monday 08 July 2002 06:48, Joachim Trinkwitz wrote:
> Hi,
>
> I want to insert a row only under condition that there isn't already
> another row with similar values -- something like a INSERT INTO
> ... WHERE NOT EXISTS (SELECT ...)?
>
> Hoping for help,
> joachim
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.






pgsql-sql by date:

Previous
From: Archibald Zimonyi
Date:
Subject: Re: Double quotes?
Next
From: Bruno Wolff III
Date:
Subject: Re: INSERT only under certain conditions (SELECT)