Outputting the Insertion Result

Posted by Karthikreddy under Sql Server category on | Points: 40 | Views : 788
if the records have been added to a table, whether the operation was successful or not, we had no way of immediately finding out (we would have to open the table). One way you can get this information is to store the inserted records in another table. To support this, Transact-SQL provides the OUTPUT operator

insert into videos output inserted.*   values('Shadow','skkjjjk',2013),
select * from videos

Comments or Responses

Login to post response