pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: Joachim Trinkwitz <jtr@uni-bonn.de>
To: pgsql-sql@postgresql.org
Subject: Re: INSERT only under certain conditions (SELECT)
Date: Mon, 8 Jul 2002 13:42:39 +0530
Message-ID: <200207081342.39151.mallah@trade-india.com> (raw)
In-Reply-To: <874rfb6mqe.fsf@wabe.germanistik.uni-bonn.de>
References: <874rfb6mqe.fsf@wabe.germanistik.uni-bonn.de>


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.







view thread (5+ messages)  latest in thread

Message-ID: <200207081342.39151.mallah@trade-india.com>
Permalink:  ../200207081342.39151.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200207081342.39151.mallah@trade-india.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: mallah@trade-india.com, jtr@uni-bonn.de
  Subject: Re: INSERT only under certain conditions (SELECT)
  In-Reply-To: <200207081342.39151.mallah@trade-india.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