IF Statement in MySQL This statement executes a block of SQL code based on a specified condition. It has three forms: Simple IF-THEN statement, IF-THEN-ELSE statement, and IF-THEN-ELSEIF- ELSE statement. MySQL simple IF-THEN statement Execute a set of SQL statements based on a specified condition. Syntax:- IF condition THEN statements; END …
Read moreVariables in MySQL Stored Procedure A variable is a namespace of data objects whose value can store, change value during the stored procedure execution. It is hold immediate results. It is local to the stored procedure. Before using a variable, one must declare it. Declaring variables Use the DECLARE statement for declaring a variable syntax : DECL…
Read moreStored Procedure in MySQL · A procedure (also called a stored procedure) is a collection of pre-compiled SQL statements, stored inside the database. · It is a subroutine or a subprogram used for computing. · It contains a name, parameter lists, and SQL statements . · It is also used in triggers, other procedures, and a…
Read more
Social Plugin