You can try using MERGE
statement for getting the same result.
With MERGE
statement you can either insert new records into table or update if the data already exists.
Please find the syntax of the MERGE
statement.
MERGE INTO <table_name>
USING <table_view_or_query>
ON (<condition>)
WHEN MATCHED THEN <update_clause>
DELETE <where_clause>
WHEN NOT MATCHED THEN <insert_clause>;
Perhaps you can give more details about you problem. I am assuming this is what is required by you.