inserting values into a table from select query code example
Example 1: 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;
Example 2: sql insert data
INSERT INTO users (first_name, last_name, address, email)
VALUES (‘Tester’, ‘Jester’, ‘123 Fake Street, Sheffield, United
Kingdom’, ‘[email protected]’);