May 2020
Beginner
564 pages
14h 9m
English
To create a stored procedure, you can use the following sample syntax:
DELIMITER $$CREATE PROCEDURE storedprocname() BEGIN your sql statments go here; END $$DELIMITER ;
To call the stored procedure that you just created, you can use the following sample syntax:
CALL storedprocname ();
To use IN parameters in a stored procedure, you can use the following sample syntax:
DELIMITER $$CREATE PROCEDURE storedprocname(IN in_varname vartype, IN in_varname2 vartype) BEGIN SELECT * FROM tablename WHERE col1 = in_varname AND col2 = in_varname2 END $$DELIMITER ;
To call your stored procedure with IN parameters, you can use the following sample syntax:
CALL storedprocname('value', value);
To use IN parameters in a stored ...
Read now
Unlock full access