Skip to main content

Variables, IF & CASE in Procedures

Learn Variables, IF & CASE in Procedures (Stored Procedures, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction Inside a procedure you declare local variables with DECLARE name TYPE [DEFAULT v] (at the start of a BEGIN block), assign with SET or SELECT ... INTO , and branch with IF ... ELSEIF ... ELSE ... END IF and CASE ... END CASE .

More lessons in Stored Procedures