SQL Server Transact Basic to Expert - Insert Query Using Select


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)
Ebook Download
View all
Learn
View all