Say table1
and table2
already exist, is there any difference between these queries
query1 :-
select * into table1 from table2 where 1=1
query2: -
insert into table1 select * from table2
The select * into table1 from table2 where 1=1
creates table1 and inserts the values of table2 in them. So, if the table is already created that statement would give an error.
The insert into table1 select * from table2
only inserts the values of table2 in table1.