Inserting records using SELECT statement Assignment Help

Assignment Help: >> Basics of SQL - Inserting records using SELECT statement

Inserting records using SELECT statement

Records should be selected and inserted from one table to another table using INSERT and SELECT statement.

Syntax:

INSERT   INTO   <tablename>   SELECT   <columnlist>   FROM   <tablename>   [WHERE <conditions>];

Example

INSERT INTO employee3 SELECT * FROM employee WHERE salary >=2000;
The above instance copies records from employee table to employee3 table where the records meet the criteria specified in the WHERE clause.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd