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

Thread: insert

  1. #1
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401

    insert

    Hi,

    how di i nsert partial columns into tablex from table y

    i have tableX which has 4 columns and i have tableY with 2 columns matches the data type of tableX

    TableX
    column1
    column2
    column3
    column4

    TableY

    column1
    column2



    i would like to insert into table X column1 and 2 from TableY column1 and column2

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Perhaps by naming the columns you want to insert?

    Don't be that lazy and take a look at INSERT statement syntax then come up with something.
    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.

  3. #3
    Join Date
    Dec 2007
    Posts
    82
    however here it is one:

    INSERT INTO tableX (column1,column2 ) select column1,
    column2 from TableY;

    ARE you oracle guy? IF yes, it’s very misfortune that you do not know insert statement syntax, better join a training center or read oracle documentation.
    Cheers
    /MR

  4. #4
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401
    thank you ..not sure what i was thinking yesterday i used values key word ..

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