Home > Databases > Quizzes > MySQL Basics Practice Test: Stored Programs
MySQL Basics Practice Test: Stored Programs
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 89% Most missed: “Which statement is used to create a trigger?”
Quiz on compound statements, stored functions, triggers, events and security. A MySQL stored program is a program that is stored in the database and can be a function, procedure, table trigger, or event. Stored programs are represented in memory by two major parts: - The code of the stored program, including SQL statements and control flow logic - A symbol table that describes all the local variables, cursors, labels, conditions, and so on declared in the code  Most MySQL stored programs consist of one or more blocks. A block consists of various types of declarations and program code,... Show more
MySQL Basics Practice Test: Stored Programs
Time left 00:00
25 Questions

1. How many values can be returned from a stored procedure?
2. Which character does the mysql client program recognize as a statement delimiter?
3. Triggers and events are invoked automatically by the server.
4. Suppose a stored function named PI() is written in the database ‘sampdb’. How would it be called?
5. Which command is used to redefined the mysql delimiter?
6. Which of these return a result to the client?
7. Which procedure parameter enables the caller to pass in a value and get back a value?
8. Which of these is a stored program associated with a schedule?
9. Triggers enable to enforce data integrity constraints.
10. A stored procedure is invoked using the statement __________
11. Which log does the event scheduler log to?
12. What is abc in the following MySQL statement?
DECLARE abc HANDLER FOR def ghi;
13. Which statement is used to check the status of the event scheduler at runtime?
14. The event scheduler does not run by default.
15. Which value of event_scheduler enables checking status but not changing it at runtime?
16. When a user creates a stored program that accesses sensitive data but forgets that other people who can invoke the object have the same access, the security context is __________
17. What is abc in the following MySQL statement?
CREATE TRIGGER abc (...) (...) ON def FOR EACH ROW ghi;
18. Which statement is used to remove a trigger?
19. When the security context enables carefully written stored programs to be set up that provide controlled access to tables for users, it is called __________
20. Which privilege must be given to the database to create a stored function or procedure?
21. How many of the following can be used in stored functions?
PREPARE, EXECUTE, DEALLOCATE PREPARE
22. Which of the following statements does not modify the table?
23. Which clause specifies periodic execution at fixed intervals?
24. Which privilege is enabled to create of alter a stored function?
25. Before MySQL 5.1.6 which privilege was required to create and drop triggers?