Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 282 Bytes

procedure.md

File metadata and controls

34 lines (28 loc) · 282 Bytes

procedure

use sakila;
DELIMITER //
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
  SELECT COUNT(*) INTO param1 FROM actor;
END;
//
DELIMITER ;
CALL simpleproc(@a);
SELECT @a;
+------+
| @a   |
+------+
|  200 |
+------+