select ..insert

  • Hi Experts,

    Is it possible to insert a select statement directly to a table.

    TIA:)

  • Certainly is...

    INSERT INTO Table2 (columnlist1)

    SELECT columnlist2 from Table1

    The names of the columns does not need to match but you do need to have the right number of columns.

  • insert into tablename select * from tablename

  • You can also use this method, which creates the table

    select *

    into {new tablename}

    from {old tablename}

    Wilfred
    The best things in life are the simple things

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

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