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

Thread: More Than One Insert In One Go

  1. #1
    Join Date
    Mar 2008
    Posts
    45

    More Than One Insert In One Go

    hI ..how can we do 2 inserts in a cursor...?
    suppose i hav two columns col1 and col 2
    i want to create two records based on the values present in both colmns at the same time.
    So wat should I do?

    For ex table 1
    col1 col2
    x y

    I need to insert two records
    one with col1 value 'x'

    and other record with col2 value y.
    format will be table2
    row1 x
    row2 y

    please put saome light on it

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Wondering if when you say "at the same time" you are actually meaning "in the same transaction" in which case I would ask... what's the problem?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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