There is already an object named 'tbltable1' in the database

Jaison picture Jaison · Jul 20, 2009 · Viewed 23.9k times · Source

I am trying to insert data from one table to another with same structure,

select * into tbltable1 from tbltable1_Link

I am getting the following error message:

There is already an object named 'tbltable1' in the database.

Answer

Cerebrus picture Cerebrus · Jul 20, 2009

The SELECT INTO statement creates a new table of the name you provide and populates it with the results of the SELECT statement.

I think you should be using INSERT INTO since the table already exists. If your purpose is in fact to populate a temporary table, then you should provide a table name that does not already exist in the database.

See MSDN for more information on this.