Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to copy data in sql

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;
Comment

PREVIOUS NEXT
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 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =