PrepAway - Latest Free Exam Questions & Answers

Which query should you use?

You have a table named JobCandidate. You are tasked to delete a row in the JobCandidate table. You
need to write a transaction that allows the database to be restored to the exact point the record was
deleted without knowing the time of execution. Which query should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
BEGIN TRANSACTION
DELETE FROM JobCandidate
WHERE JobCandidateID = 10;
COMMIT TRANSACTION;

B.
BEGIN TRANSACTION
WITH MARK N’Deleting a Job Candidate’;
DELETE FROM JobCandidate

WHERE JobCandidateID = 10;
COMMIT TRANSACTION

C.
BEGIN TRANSACTION Delete_Candidate WITH MARK
DELETE FROM JobCandidate
WHERE JobCandidateID = 10;
COMMIT TRANSACTION Delete_Candidate;

D.
DECLARE @CandidateName varchar(50) = ‘Delete_Candidate’
BEGIN TRANSACTION @CandidateName
DELETE FROM JobCandidate
WHERE JobCandidateID = 10;
COMMIT TRANSACTION @CandidateName;


Leave a Reply