Transfer Data from One Table to Another

Mostly developers need to transfer data from one table to another. For this purpose we have two scenarios :

One target table is already created. second target table is not already created

So in first scenario when Target table is already created.

we can use following command :

INSERT INTO TargetTable (FirstName, LastName)

SELECT FirstName, LastName

FROM sourceTable

WHERE age = 21

So in first scenario when Target table is not already created.

SELECT FirstName, LastName

INTO TargetTable

FROM sourceTable

WHERE age = 21

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now