copy data from one table to another table with different fields

  • I need to copy data from one table to another table. But the 2 table do not have all the same fields as the 1st table.

    For example

    1 Table has

    id

    First name

    last name

    Address

    City

    Zip

    2 Table has

    id

    First Name

    Last Name

    Zip

    I need to copy First name , last name and zip from the first table to the second table. How do i do that.

     

  • you could do an

    INSERT INTO table1( col1, col2, col3)

    SELECT col1, col2, col3

    FROM table2

    ******************
    Dinakar Nethi
    Life is short. Enjoy it.
    ******************

  • Thanks

    Have a nic e day.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply