MySQL MCQs with answers Page - 182

Here, you will find a collection of MCQ questions on MySQL. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 802.91K Points
Coach

Q. Which of the following is TRUE about transaction handling in stored procedures?

  • (A) Procedures can use START TRANSACTION, COMMIT, and ROLLBACK
  • (B) Procedures cannot manage transactions
  • (C) Procedures only commit automatically
  • (D) Procedures cannot rollback changes

A

Admin • 802.91K Points
Coach

Q. Which system table stores stored procedure definitions in MySQL?

  • (A) mysql.routines
  • (B) information_schema.procedures
  • (C) mysql.procedures
  • (D) information_schema.routines

A

Admin • 802.91K Points
Coach

Q. Which type of handler allows continuing procedure execution after an error occurs?

  • (A) EXIT
  • (B) CONTINUE
  • (C) IGNORE
  • (D) STOP

A

Admin • 802.91K Points
Coach

Q. Can stored procedures return multiple result sets in MySQL?

  • (A) Yes, by using multiple SELECT statements
  • (B) No, only one result set is allowed
  • (C) Yes, but only with OUT parameters
  • (D) No, only functions return multiple results

A

Admin • 802.91K Points
Coach

Q. Which statement is used to declare a condition handler for a specific SQLSTATE code?

  • (A) DECLARE CONTINUE HANDLER FOR SQLSTATE 'code'
  • (B) DECLARE EXIT HANDLER ON ERROR
  • (C) HANDLER SQLSTATE 'code'
  • (D) SET HANDLER SQLSTATE 'code'

A

Admin • 802.91K Points
Coach

Q. Which statement inside a stored procedure ensures safe cleanup of cursors after use?

  • (A) CLOSE cursor_name
  • (B) DEALLOCATE cursor_name
  • (C) DROP cursor_name
  • (D) END cursor_name

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ