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

前端 未结 6 1844
刺人心
刺人心 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条回答
  •  旧时难觅i
    2020-12-25 12:03

    INSERT INTO TABLE_A SELECT * FROM TABLE_B
    

    Is a commonly used sentence, which is used to insert values of a table into another table. Selected columns can also be inserted using this.

    SELECT * INTO TABLE_A FROM TABLE_B
    

    Will create a new TABLE_A populated with values of TABLE_B

提交回复
热议问题