create table insert into select code example
Example 1: insert select
INSERT INTO table2
SELECT * FROM table1
WHERE condition;
Example 2: SELECT INTO
SELECT * INTO nome_da_tabela_que_estao_a_mexer_BKP
FROM nome_da_tabela_que_estao_a_mexer
INSERT INTO table2
SELECT * FROM table1
WHERE condition;
SELECT * INTO nome_da_tabela_que_estao_a_mexer_BKP
FROM nome_da_tabela_que_estao_a_mexer