• hoseam (2/7/2014)


    Without listing the columns??

    nope. it's actually a best practice to name the columns every single time, because as soon as you add a column to either table, any existing code that was not changed in tandem to the new column being added would fail.

    the only exception might be not identifying the destination columns, and that's only if the # of columns match exactly(ignoring identity and calculated columns)

    INSERT INTO TableA

    SELECT Column1,Column2,otherColumns

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!