MySQL Stored Procedure MCQs with answers Page - 1

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 • 802.91K Points
Coach

Q. Which statement is used to create a stored procedure in MySQL?

  • (A) CREATE FUNCTION
  • (B) CREATE PROCEDURE
  • (C) DEFINE PROCEDURE
  • (D) NEW PROCEDURE

A

Admin • 802.91K Points
Coach

Q. Which command is used to execute a stored procedure in MySQL?

  • (A) EXECUTE procedure_name
  • (B) CALL procedure_name
  • (C) RUN procedure_name
  • (D) DO procedure_name

A

Admin • 802.91K Points
Coach

Q. Which keyword is used to end each statement inside a stored procedure?

  • (A) ; (semicolon)
  • (B) END
  • (C) DELIMITER
  • (D) STOP

A

Admin • 802.91K Points
Coach

Q. Which command is used to remove a stored procedure?

  • (A) DELETE PROCEDURE
  • (B) DROP PROCEDURE
  • (C) REMOVE PROCEDURE
  • (D) ALTER PROCEDURE

A

Admin • 802.91K Points
Coach

Q. In MySQL, parameters in a stored procedure can be defined as?

  • (A) IN, OUT, INOUT
  • (B) READ, WRITE, EXECUTE
  • (C) PARAM, VAR, ARG
  • (D) INPUT, OUTPUT

A

Admin • 802.91K Points
Coach

Q. Which of the following is TRUE about IN parameters in MySQL stored procedures?

  • (A) They can only return values
  • (B) They can only accept input values
  • (C) They work like both input and output
  • (D) They must always be NULL

A

Admin • 802.91K Points
Coach

Q. What does an OUT parameter in a stored procedure do?

  • (A) Takes input from user
  • (B) Returns a value back to the caller
  • (C) Stores table schema
  • (D) Logs procedure execution

A

Admin • 802.91K Points
Coach

Q. Which statement is used inside stored procedures to handle conditions?

  • (A) IF ... ELSE
  • (B) CASE
  • (C) LOOP
  • (D) All of the above

A

Admin • 802.91K Points
Coach

Q. Which of the following is a loop construct in MySQL stored procedures?

  • (A) FOR ... END FOR
  • (B) WHILE ... END WHILE
  • (C) LOOP ... END LOOP
  • (D) All of the above

A

Admin • 802.91K Points
Coach

Q. What is the purpose of the DELIMITER command when creating a stored procedure?

  • (A) It sets the schema name
  • (B) It changes the statement terminator temporarily
  • (C) It removes semicolons
  • (D) It compiles the procedure
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