Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> best way to conditionally insert a row
I would like to insert a row into a table, but only
if the primary key does not exist.
For example, if I have a table "keywords" with columns "name" and "val", I would like
insert into keywords (name, val) values ('color', 'blue');
to happen only if there is not already a row where name='color'.
What is the best way to do this?
Many TIA!
Mark
Received on Wed Aug 08 2007 - 19:05:17 CDT