This blog shows how to use a INSERT query with Select query to insert values fetched by the select statement
Syntax:
INSERT INTO TABLE
COLUMN_LIST
Values
(Select Column_List from Table)
Example:
Insert into emptabletemp
(EMPNAME, EMPID)
Values
(Select empname, empid from emptable)
SQL Server Transact Basic to Expert - Insert Query Using Select
SQL Server Transact Basic to Expert - Insert Query Using Select


Join the conversation! Your thoughts help the community grow.