table JOIN with INSERT statment

Last post 05-13-2008 11:21 AM by XPSCodes. 2 replies.

Sort Posts:

  • table JOIN with INSERT statment

    05-11-2008, 9:09 PM
    • Loading...
    • alclemen
    • Joined on 05-02-2008, 10:04 AM
    • Singapore City
    • Posts 6

    How to perform a table JOIN with the INSERT SQL statment, just show a join example between 2 tables will do.

  • Re: table JOIN with INSERT statment

    05-11-2008, 9:43 PM
    • Loading...
    • amensi
    • Joined on 02-13-2006, 7:43 PM
    • Canada
    • Posts 345

    Hi,

    Just to be sure i understand correctly, are you trying to insert in two tables ?

    Alex Mensi - Check out my blog
    Maven Technologies Inc.
    --

    Don't forget to click "Mark as Answer" on the post that helped you.
  • Re: table JOIN with INSERT statment

    05-13-2008, 11:21 AM
    Answer
    • Loading...
    • XPSCodes
    • Joined on 03-12-2008, 3:17 AM
    • New Jersey
    • Posts 444

     Something like this?

    Insert Table3 (ColA,ColB,ColC)

    Select Table1.Col1,Table1.Col2,Table2.Col3 

    From Table1 Inner Join Table2 On Table1.Id=Table2.Pid 

    Where Conditions 

    Save our world, its all we have! A must watch video Pale Blue Dot

    Please use the search feature of the forum before asking a question.
Page 1 of 1 (3 items)