Re: [SQL] fast insert-if-key-not-already-there

2008-08-04 Thread Richard Broersma
On Mon, Aug 4, 2008 at 8:51 AM, Patrick Scharrenberg <[EMAIL PROTECTED]> wrote: > My current approach is to query for the key (ip-address), and if the > result is null I do the insert. > For every IP-Address I need the ip_addr_id from the same table. >INSERT INTO ip_addre

Re: [SQL] fast insert-if-key-not-already-there

2008-08-04 Thread Thomas Kellerer
Patrick Scharrenberg, 04.08.2008 17:51: Hi! I have to do much inserts into a database where the key most often is already there. My current approach is to query for the key (ip-address), and if the result is null I do the insert. For every IP-Address I need the ip_addr_id from the same table. [