adplus-dvertising
frame-decoration

Question

Which of the following code snippet is valid control flow statement?

a.

IF (@@Error 0)
ROLLBACK
ELSE
COMMIT
END

b.

IF (@@Error 0)
ROLLBACK

c.

IF (@@Error 0)
ROLLBACK
ELSE
END

d.

All of the mentioned

Posted under SQL Server

Answer: (a).IF (@@Error 0)
ROLLBACK
ELSE
COMMIT
END

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following code snippet is valid control flow statement?

Similar Questions

Discover Related MCQs

Q. Point out the wrong statement.

Q. Which of the following two Transact-SQL statements are commonly used with WHILE?

Q. Which of the following scenario makes use of BEGIN..END keyword redundant?

Q. The BEGIN and END statements are used when ____________

Q. Which of the following components constitutes use CASE expression?

Q. Variables was added newly to SQL Server version _____________

Q. Point out the wrong statement.

Q. Which of the following keyword is not associated with initialization of variable?

Q. Which of the following is a global variable?

Q. Point out the right statement.

Q. Which of the following global has return type ‘numeric’?

Q. _________ gives amount of time, in ticks, that SQL Server has been idle since it was last started.

Q. @@LANGUAGE variable whose return type nvarchar is specified in _____________

Q. Life cycle of typical cursor involves ______ steps in SQL Server.

Q. Point out the correct statement.

Q. How many type of cursor is present in SQL Server?

Q. Various alternatives to cursor in SQL Server are ___________

Q. Point out the wrong statement.

Q. A dynamic cursor in SQL Server allows you to see __________ data.

Q. Which of the cursors further have their subtypes?