Stored
Stored programs in MySQL: procedures, functions, triggers, events. They live in the database. The CLI needs a different DELIMITER to define them.
Functions — SELECT fn(marks). Procedures: CALL. Triggers: automatic. Events: scheduled (like a cron inside MySQL).
Trap — ‘stored’ as a vague word without saying which of the four.
On the example next to this theory: Stored: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.
Exam tip
Four stored objects. DELIMITER when you CREATE them.