MySQL Stored Procedure MCQs with answers Page - 4

You will find multiple-choice questions (MCQs) related to #MySQL Stored Procedure here. Go through these questions to prepare effectively for your upcoming exams and interviews.

To view the correct answer for any question, simply click the "Show Answer" button.

Have a question to share? Click on "Add Question" to contribute!

A

Admin • 828.70K Points
Coach

Q. Which command is used to change an existing stored procedure?

  • (A) ALTER PROCEDURE
  • (B) MODIFY PROCEDURE
  • (C) UPDATE PROCEDURE
  • (D) CHANGE PROCEDURE

A

Admin • 828.70K Points
Coach

Q. Can stored procedures return result sets?

  • (A) Yes, by using SELECT statements inside
  • (B) No, only functions return results
  • (C) Yes, but only one row
  • (D) Only if OUT parameters are used

A

Admin • 828.70K Points
Coach

Q. Which command is used to list all stored procedures in a database?

  • (A) SHOW PROCEDURES
  • (B) SHOW CREATE PROCEDURE
  • (C) SHOW PROCEDURE STATUS
  • (D) DESCRIBE PROCEDURE

A

Admin • 828.70K Points
Coach

Q. Which keyword allows multiple SQL statements to be executed together inside a procedure?

  • (A) DO ... END DO
  • (B) BEGIN ... END
  • (C) START ... END
  • (D) BLOCK

A

Admin • 828.70K Points
Coach

Q. Which storage engine in MySQL is required to use transactions inside stored procedures?

  • (A) MyISAM
  • (B) InnoDB
  • (C) CSV
  • (D) MEMORY

A

Admin • 828.70K Points
Coach

Q. Which command shows the SQL code of an existing stored procedure?

  • (A) SHOW PROCEDURE
  • (B) SHOW CREATE PROCEDURE procedure_name
  • (C) DESCRIBE procedure_name
  • (D) SELECT FROM mysql.procedures

A

Admin • 828.70K Points
Coach

Q. Can you use dynamic SQL inside stored procedures?

  • (A) Yes, using PREPARE and EXECUTE statements
  • (B) No, only functions allow dynamic SQL
  • (C) Yes, but only with OUT parameters
  • (D) No, MySQL does not support it

A

Admin • 828.70K Points
Coach

Q. Which clause is used to restrict who can invoke a stored procedure?

  • (A) SECURITY DEFINER
  • (B) LIMIT USER
  • (C) ACCESS CONTROL
  • (D) GRANT EXECUTE

A

Admin • 828.70K Points
Coach

Q. What happens if you drop a procedure that is being executed by a client?

  • (A) It throws an error immediately
  • (B) The current execution completes but the procedure is removed afterward
  • (C) It aborts execution instantly
  • (D) It locks the database

A

Admin • 828.70K Points
Coach

Q. Which keyword in a stored procedure allows defining multiple statements as a block?

  • (A) BEGIN ... END
  • (B) START ... STOP
  • (C) BLOCK ... END
  • (D) DO ... DONE
What's Tag

As you may know, questions are organized under broad categories. Each category can include various types of questions. For example, the "History" category might contain questions about the Revolt of 1857, Shivaji Maharaj, Ancient History, Buddhism, and more.

To further refine this organization, we've introduced tags, which act as sub-categories to group questions more specifically.

Verified users can add tags to any question. If you have any suggestions regarding this system, we'd love to hear from you. Contact Us

Learn More