martedì 3 novembre 2009

Conditional Insert if exist

INSERT INTO sometable
SELECT "code","description"
FROM DUAL
WHERE NOT EXISTS 
(
SELECT 1
FROM sometable
WHERE column1 = "code"
AND column2 = "description"
);

in riferimento a: ORACLE DECODE CASE SQL PL/SQL (visualizza su Google Sidewiki)

Nessun commento:

Posta un commento