Vidyalelo
MySQL · Q1076

MySQL

Programming · MySQL · question 1076

Q1076

Which of these is a stored program associated with a schedule?

A.
Trigger
B.
Event
Answer
C.
Stored function
D.
Stored procedure

Answer: Option B

Solution

Answer: Option B
Solution:
This question asks about something called a stored program that is linked to a schedule. Let's break down each option:
Option A: Trigger
Triggers are like automatic actions that happen when something specific occurs in a database. For example, when a new record is added to a table, a trigger could be set to update another table automatically. They are not directly related to schedules.
Option B: Event
Events are scheduled tasks that happen at a certain time. They are the closest match to our question because they involve a schedule. Think of it as setting an alarm on your phone to remind you of something.
Option C: Stored function
Stored functions are like mini programs inside a database that perform specific tasks. They aren't usually associated with schedules.
Option D: Stored procedure
Stored procedures are similar to stored functions, but they can do more complex tasks. They also are not tied to schedules.
So the answer is Option B: Event because events are stored programs that run according to a schedule.