INSERT INTO my_table my
SELECT * FROM another_table an
WHERE an.col1 > 10;
INSERT INTO my_table (colA, colB)
SELECT an.col1 AS colA, an.col2 AS colB FROM another_table an
WHERE an.col1 > 10;
Code Example |
---|
Sql :: drop temp table if exists |
Sql :: oracle get running queries |
Sql :: temp table vs variable table in sql server |
Sql :: sql table |
Sql :: how to identify locked tables in sql server |
Sql :: update with join |
Sql :: add column postgres with default value |
Sql :: restroe pg_dump example |
Sql :: sql left characters |
Sql :: add a day big query |
Sql :: oracle percentage |
Sql :: mysql 1 hour ago |
Sql :: Cast for print sql |
Sql :: postgresql get date now |
Sql :: empty table sqlite |
Sql :: sql change date format |
Sql :: update with inner join sql server |
Sql :: postgresql subtract date/hours |
Sql :: sql extract from mail |
Sql :: mysql get nth highest |
Sql :: oracle index hint |
Sql :: oracle sql copy table without data |
Sql :: get number of columns sql |
Sql :: installing mysql on centos 7 |
Sql :: mysql date format |
Sql :: sqlserver add column |
Sql :: mysql url data type |
Sql :: SQL Duplicates by Composite |
Sql :: athena create table |
Sql :: declare table variable sql |