DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: merge

  1. #1
    Join Date
    Oct 2003
    Location
    India
    Posts
    39

    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)

  2. #2
    Join Date
    Jun 2000
    Posts
    295
    Merge=upsert
    meaning update or insert.

    If you do not want update, why not just use insert?

  3. #3
    Join Date
    Jun 2001
    Location
    California
    Posts
    124
    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
  •  


Click Here to Expand Forum to Full Width