标签:
mysql> DELIMITER // mysql> CREATE PROCEDURE processorders() -> BEGIN -> -- Declare the cursor -> DECLARE ordernumbers CURSOR -> FOR -> SELECT order_num FROM orders; -> -> -- Open the cursor -> OPEN ordernumbers; -> -> -- Close the cursor -> CLOSE ordernumbers; -> END// Query OK, 0 rows affected (0.00 sec) mysql> DELIMITER ; mysql> CALL processorders(); Query OK, 0 rows affected (0.01 sec)
标签:
原文地址:http://www.cnblogs.com/fatoland/p/4565720.html