Can I select a set of Data and directly insert that into a table in SQL?

Posted by VJ on Stack Overflow See other posts from Stack Overflow or by VJ
Published on 2010-06-07T17:22:59Z Indexed on 2010/06/07 17:32 UTC
Read the original article Hit count: 292

Filed under:
|
|
|
|

Hi I guess we cannot do this but was just curious if I could do something like -

Select * from Employee where EmployeeId=1

and then use the data in the above statement and directly insert into a table with just changing the employeeid...or just this way-

insert into Employee ( Select * from Employee where EmployeeId=1)

its probably stupid from my side...but I just felt the need to do this a lot of times...so just was curious if there was any way to achieve it..

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server