Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL update/insert statement.

SQL update/insert statement.

From: Sean <dolans_at_my-deja.com>
Date: Mon, 27 Mar 2000 16:42:31 GMT
Message-ID: <8bo31k$aae$1@nnrp1.deja.com>


I have a table that I want to either update the counter on or else insert a new record if it doesn't exist.

In PL/SQL I can do a count(id) on the table and update it if > 0 or insert if not there ( equals 0 )

Is there a more efficient way of doing this in an SQL Statement?

Thanks!

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Mar 27 2000 - 10:42:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US