I can use
Scope_Identity() to get the last identity value inserted into an identity column. But how can i get identity values of all rows which are inserted in a insert statement?
insert into DestinationTbl select * from SourceTbl where [col1]='xyz'
Above statement may insert more than one rows into a table. So i want identity value of all the rows which are inserted. How it can be done?