append from table1 any sql equivalent query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kkshansid
    New Member
    • Oct 2008
    • 232

    #1

    append from table1 any sql equivalent query

    is there any sql equivalent of foxpro command
    use tablefinal
    append from table1
    append from table2
    append from table3
    here append inserts matching column records from all three tables in final
    insert data in tablefinal from table1,2 and 3
  • patjones
    Recognized Expert Contributor
    • Jun 2007
    • 931

    #2
    Hi kk,

    I don't know if there's a corresponding command in SQL Server (I suspect that you can find out for sure by combing through the help utilities). Why not just do something like this:

    Code:
    INSERT INTO tablefinal(column_name) SELECT column_name
                                        FROM table1;

    Comment

    • alemgeb
      New Member
      • Dec 2011
      • 2

      #3
      You can use union all operator as:
      select * from table1
      union all
      select * from table2
      union all
      select * from table3.

      You may use union operator if you want to avoid duplicat values.

      Thanks

      Alemayehu G. Desta

      Comment

      Working...