Oracle database has one class to update or insert the rows into table or view which is "MERGE".
MERGE class can do this kind of operations very easily.Now i will shown a simple example in below
Example:
MERGE class can do this kind of operations very easily.Now i will shown a simple example in below
Example:
MERGE into Employee USING Users
ON(Employee.name=Users.name)
WHEN matched then UPDATE SET Employee.role=Users.role,Employee.Add=Users.Add
WHEN matched Then Insert(name,role,add,phno) values (Users.name,Users.role,Users.add,Users.phno)
No comments:
Post a Comment