INSERT INTO Emp(Name,HireDate,Designation)
OUTPUT getdate(), inserted.EmpId INTO Audit
VALUES ('Robot','1/1/2011','Executive'); What is the functionality of above INSERT statement?

 Posted by Bandi on 9/30/2013 | Category: Sql Server Interview questions | Views: 1330 | Points: 40
Select from following answers:
  1. Adds a new row to the Emp table, and also adds a corresponding row with the current date and time and the EmpId for the new employee into the Audit table.
  2. Only inserts a new record into the Emp table.
  3. OUTPUT clause cannot be used in the INSERT command
  4. Error
  5. All Above

Show Correct Answer

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response