Reputation: 1272
I have two tables table1 with fields f1, f2
and
table2 with fields id,f1,f2, where id is incremental field
I need to take the values from table1 and need to insert into table2
Can anyone give the query for that,in sql server
Upvotes: 1
Views: 93
Reputation: 19513
INSERT INTO table2(f1,f2) SELECT f1,f2 FROM table1
That will do exactly what you want.
Upvotes: 1