{"id":116,"date":"2009-02-03T17:41:27","date_gmt":"2009-02-04T01:41:27","guid":{"rendered":"http:\/\/hongyu.org\/wordpress\/?p=116"},"modified":"2009-02-03T17:43:15","modified_gmt":"2009-02-04T01:43:15","slug":"oracle-avoid-insert-duplicated-records","status":"publish","type":"post","link":"https:\/\/www.hongyu.org\/wordpress\/?p=116","title":{"rendered":"Avoid inserting duplicated records in Oracle"},"content":{"rendered":"<p>See <a href=\"http:\/\/www.techonthenet.com\/sql\/insert.php\">http:\/\/www.techonthenet.com\/sql\/insert.php<\/a><\/p>\n<blockquote class=\"sql_command\"><p>\nINSERT INTO clients<br \/>\n(client_id, client_name, client_type)<br \/>\nSELECT 10345, &#8216;IBM&#8217;, &#8216;advertising&#8217;<br \/>\nFROM dual<br \/>\nWHERE not exists (select * from clients<br \/>\nwhere clients.client_id = 10345);\n<\/p><\/blockquote>\n<p>The use of the <strong>dual<\/strong> table allows you to enter your values in a select statement, even though the values are not currently stored in a table.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>See http:\/\/www.techonthenet.com\/sql\/insert.php INSERT INTO clients (client_id, client_name, client_type) SELECT 10345, &#8216;IBM&#8217;, &#8216;advertising&#8217; FROM dual WHERE not exists (select * from clients where clients.client_id = 10345); The use of the dual table allows you to enter your values in a select statement, even though the values are not currently stored in a table.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/116"}],"collection":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=116"}],"version-history":[{"count":4,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/116\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}