• hoseam (2/7/2014)


    Hi

    Is there a way I can:

    INSERT INTO TableA

    SELECT * FROM TableB

    but exclude one column from TableB?

    My TableB has ID which is IDENTITY(1,1), I want to select everything to TableA except the ID

    easily, but you have to explicitly name the columns.

    INSERT INTO TableA(Column1,Column2,otherColumns)

    SELECT Column1,Column2,otherColumns

    FROM TableB

    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!