INSERT INTO MAPPING_TBL (G_ID, MR_ID, G_TYPE, G_NUMBER)
SELECT :G_ID AS G_ID, :MR_ID AS MR_ID, :G_TYPE AS G_TYPE, :G_NUMBER AS G_NUMBER
FROM DUAL WHERE NOT EXISTS
(SELECT G_ID, MR_ID, G_TYPE, G_NUMBER
FROM MAPPING_TBL
WHERE G_ID = :G_ID2 AND
MR_ID = :MR_ID2 AND
G_TYPE = :G_TYPE2 AND
G_NUMBER = :G_NUMBER2)
任何人都可以解釋這是什麼實際的SQL?特別是這是什麼這是什麼sql意味着
SELECT :G_ID AS G_ID, :MR_ID AS MR_ID, :G_TYPE AS G_TYPE, :G_NUMBER AS G_NUMBER
FROM DUAL
SQL做,謝謝。
如果你以可讀的方式格式化它可能會有所幫助。 – Kevin