Introduction
IF-ELSE lets you make decisions inside a procedure. It helps the database choose what to do based on conditions.
You want to check if a value is above or below a limit and act differently.
You want to run some code only if a user exists in the database.
You want to update a record only if certain conditions are met.
You want to return different messages based on input values.