Tag Archives: select into vs insert into

Syntax for INSERT INTO vs SELECT INTO

One is commonly confused for the other….so ….

SELECT INTO inserts data into a new table and creates the new table on the fly (Table doesn’t exist) …


SELECT * INTO dbo.NewTableThatDoesntExist
from dbo.TableYouWantToCopyFrom

INSERT INTO inserts data into an existing table …


INSERT INTO dbo.NewTableThatAlreadyExists (Column1, Column2)
SELECT Column1, Column2
FROM dbo.TableYouWantToCopyFrom

Reference from Pinal Dave.