Reputation: 631
i have a doubt. i need the syntax for SQL SERVER – how to Insert Data From One Table to Another Table?
Upvotes: 2
Views: 2778
Reputation: 1
Insert INTO Table1 (UserName) (Select UName From Table2 b Where Table1.EID = b.EID)
But Showing Message:
The multi-part identifier "Table1.EID" could not be bound.
Upvotes: 0
Reputation: 263683
use INSERT INTO..SELECT
statement
INSERT INTO table2 (col1,...)
SELECT col1,...
FROM table1
Upvotes: 7