-
merge
is it possibale to use the merge stmt with out updates.some time i don't need to use any updates.I don't want to use the Italicones.is there a way i can run this stmt with out update
pls help
thanks
merge into student c1 using
(select * from studentmain) c2 on
--- here some time's i don't have key columns
(c1.sid=c2.sid)
when matched then update set
c1.sname=c2.sname,
c1.class=c2.class
when not matched then insert
(c1.sno,c1.sname,c1.class)
values(c1.sno,c1.sname,c1.class)
-
Merge=upsert
meaning update or insert.
If you do not want update, why not just use insert?
-
merge into student c1 using
(select * from studentmain) c2 on
--- here some time's i don't have key columns
(c1.sid=c2.sid)
when matched then update set
c1.sname=c1.sname
when not matched then insert
(c1.sno,c1.sname,c1.class)
values(c1.sno,c1.sname,c1.classs)
If u r motive is to speedup the process thru MERGE statement then I would say go for BULK BIND thru Pl/SQL block instaed of MERGE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|