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

Check before insert

From: SG Edwards <s0460205(at)sms(dot)ed(dot)ac(dot)uk>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Check before insert
Date: 2005-03-15 21:07:43
Message-ID: 1110920863.42374e9f75aa1@sms.ed.ac.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces

Hi,

I have a table as follows:

protein_id | name
___________ ______

P04667      Albumin
P45366      Lactoglobulin
....
etc

I have a perl script that will insert data into this table from a file
containing a list of protein_id and names. However, I only want to insert
proteins where they are not already present in the database. Is there a way to
do this using an SQL command?


Thanks


Responses

pgsql-interfaces by date

Next:From: Robert PerryDate: 2005-03-15 21:51:20
Subject: Re: Check before insert
Previous:From: John DeSoiDate: 2005-03-14 01:50:41
Subject: Re: simple question

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