Skip to content
Advertisement

Tag: oracle-sqldeveloper

Insert if not exists Oracle

I need to be able to run an Oracle query which goes to insert a number of rows, but it also checks to see if a primary key exists and if it does, then it skips that insert. Something like: Is this at all possible with Oracle? Bonus points if you can tell me how to do this in PostgreSQL

Oracle SQL escape character (for a ‘&’)

While attempting to execute SQL insert statements using Oracle SQL Developer I keep generating an “Enter substitution value” prompt: I’ve tried escaping the special character in the query using the ” above but I still can’t avoid the ampersand, ‘&’, causing a string substitution. Answer the & is the default value for DEFINE, which allows you to use substitution variables.

Advertisement