sql - Insert new Records from one table to another table using Minus -
i inserting records in table1 , inserted table 2. if insert new records table1 new records should populated table2. can use minus concept both tables not purged out. proper use minus concept means suppose both table have 100 000 records available. in table 1 inserting more 100 000 records. minus useful use here or have use concept?
as @tony andrews said in comments, want use merge statement here.
here's basic syntactic use:
merge <target table> using <souce table/view/result of subquery> on <match condition> when matched <update clause> <delete clause> when not matched <insert clause>
extremely powerful in warehousing.
Comments
Post a Comment