Search
 
SCRIPT & CODE EXAMPLE
 

SQL

SQL INSERT INTO SELECT Statement

INSERT INTO user_profile (
    name, 
    client_id, 
    email_id,
    mobile,
    create_date,
    last_modified
)
SELECT 
    name, 
    client_id, 
    email_id,
    mobile,
    now(),
    now()
FROM 
    user_profile
WHERE 
    id = 106
Comment

sql server insert into select

INSERT INTO sales.addresses (street, city, state, zip_code) 
SELECT
    street,
    city,
    state,
    zip_code
FROM
    sales.customers
ORDER BY
    first_name,
    last_name; 
Comment

insert into values select

INSERT INTO my_table SELECT * FROM source_table;
INSERT INTO my_table (a, b, c) SELECT a, b, c FROM source_table;
INSERT INTO my_table (a, b, c) SELECT a, b, c FROM source_table s
	WHERE s.my_col >= 10;
Comment

insert select

INSERT INTO table2
SELECT * FROM table1
WHERE condition;
Comment

SQL Server INSERT INTO SELECT

 INSERT INTO table1
 SELECT col1, col2 , col3 FROM table2
 WHERE your condition;
Comment

SQL Server INSERT INTO SELECT

 INSERT INTO salesTransaction_History
 SELECT * FROM salesTransaction
 WHERE item_Number='Salt-1';
Comment

SQL INSERT INTO SELECT Statement

INSERT INTO OldCustomers
SELECT *
FROM Customers;
Comment

PREVIOUS NEXT
Code Example
Sql :: call function sql oracle 
Sql :: set open file limit mac catalina mysql 
Sql :: how to combine first and last nae into one columb sql 
Sql :: mysql list tables by size 
Sql :: mysql current time 
Sql :: read all columns of a table sql 
Sql :: oracle revoke 
Sql :: oracle running queries 
Sql :: how to check table lock 
Sql :: RowDataPacket 
Sql :: mysql delete table with foreign key 
Sql :: mysql two column combination unique 
Sql :: postgresql concatenate multiple rows into one row 
Sql :: How can I tell how many Cores SQL Server is actually using? 
Sql :: insensitive case match sqlalchemy 
Sql :: sql count null as 0 
Sql :: python mysql query where 
Sql :: SQL Server Configuration Manager location 
Sql :: wherein sql 
Sql :: difference between join vs union 
Sql :: how to set up a trigger in sql 
Sql :: postgresql get date from datetime 
Sql :: current date in sql 
Sql :: sort by mysql 
Sql :: get cpu details sql 
Sql :: dump heroku database to sql 
Sql :: sql cnvert bit to nvarchar 
Sql :: counting in sql 
Sql :: select random sample sql 
Sql :: alter table primary key postgresql 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =