Skip site navigation (1) Skip section navigation (2)

SQL Query

From: beyaNet Consultancy <beyanet(at)ntlworld(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQL Query
Date: 2004-03-23 20:02:32
Message-ID: 051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com (view raw or flat)
Thread:
Lists: pgsql-sql
Hi,
I am trying to create a query which basically goes along the lines of:

INSERT INTO tableX ( COL1, COL2 ) VALUES ( x, y ) where COL1 !=x and 
COL2 !=Y

So, insert a record into tableX where there is not already an existence 
of COL1 and COL2

Can this be done as I have described or is there a more efficient way 
to do this?

many thanks

Peter

Responses

pgsql-sql by date

Next:From: Bruno Wolff IIIDate: 2004-03-23 20:46:30
Subject: Re: SQL Query
Previous:From: Guy FraserDate: 2004-03-23 19:05:20
Subject: Re: [GENERAL] PHP or JSP? That is the question.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group