SQL Server 'select * into' versus 'insert into ..select *

前端 未结 6 1834
刺人心
刺人心 2020-12-25 11:08

Say table1 and table2 already exist, is there any difference between these queries

query1 :-

select * into table1 from tabl         


        
6条回答
  •  遥遥无期
    2020-12-25 11:49

    The first one (SELECT INTO) will create and populate a new table the second (INSERT... SELECT) inserts to an existing table.

    In versions of SQL Server prior to 2008 the first one could be minimally logged and the second one not but this is no longer true.

提交回复
热议问题