Hi Monalisha,
I would not advise using a SQL query to insert any data into the database with a Mendix database. Mendix objects has an unique ID that is generated by the runtime. Adding any objects, other than through the runtime will cause issues.
Rather use a microflow that first attempts to retrieve your desired object and then, if it is not found, creates it.
Good luck
i sql
Use the INSERT IGNORE command rather than the INSERT command. If a record doesn't duplicate an existing record, then MySQL inserts it as usual. If the record is a duplicate, then the IGNORE keyword tells MySQL to discard it silently without generating an error.
and here is also equivalent answer in oracle.
Oracle Equivalent to MySQL INSERT IGNORE? - Stack Overflow
hope this will help you.