Click here to Skip to main content
15,878,048 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello Sir,
Please help me in my query kindly tell me the meaning

OUTPUT inserted.*
VALUES(N'War of the Roses (The)', N'Dany de Vito', 0, N'R', 2001),
      (N'Memoirs of a Geisha', N'Rob Marshall', 1, N'PG-13', 2006),
      (N'Last Castle (The)', N'Rod Lurie', 1, N'', 2001),
      (N'Sneakers', N'Phil Alden Robinson', 1, N'PG-13', 2003);

What is the meaning of OUTPUT inserted.* ?

Thanks in Advance
Updated 7-Jan-12 1:21am

1 solution

Read this page, it described it in details :[^]

OUTPUT will return affected rows by the last command which is an insert command here.

Here is another example :[^]

Hope it helps.
Share this answer
Prashant Srivastava LKO 9-Jan-12 5:32am    
Thanks sir for the help, nice link
Amir Mahfoozi 9-Jan-12 5:34am    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900