Home
> Sql Server > Inserting Data Into Table Using Select Query
Inserting Data Into Table Using Select Query
In SQL, sometimes we need to select some data from one table and insert data into another table, this can be done as follows with a simple sql query:
Insert into Table1 (c1, c2, c3, c4, c5)
(Select c1, c2, c3, c4, c5 from Table2)
But make sure that both the tables have same fields, data type..
Categories: Sql Server
insert, insert using select, query, sql query, Sql Server, subquery
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Recent Comments