Select from following answers:- DELETE FROM EMP OUTPUT deleted.* INTO EmpHistory FROM Emp JOIN deptON EMP.DeptId = Dept.DeptId WHERE DeptName='IT';

- DELETE FROM EMP OUTPUT deleted.* INTO EmpHistory FROM Emp JOIN Dept ON EMP.DeptId = Dept.DeptId ;
- DELETE FROM EMP OUT PUT deleted.* INTO EmpHistory FROM Emp JOIN deptON EMP.DeptId = Dept.DeptId WHERE DeptName='IT';
- None of the above
- All Above
The OUTPUT clause returns the deleted records by using DELETED virtual table.
INTO clause inserts the records into another table called "EmpHistory"
Finally we can say that
" OUTPUT DELETED.* INTO EmpHistory " will do the required functionality as per our requirement
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator