当前位置:Gxlcms > 数据库问题 > MySQL.CURSOR

MySQL.CURSOR

时间:2021-07-01 10:21:17 帮助过:3人阅读

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)

 

MySQL.CURSOR

标签:

人气教程排行