mysqlcursorsql
求高手指点 语法哪里有问题啊
DELIMITER $$
CREATE
/*[DEFINER = { user | CURRENT_USER }]*/
PROCEDURE x_similarity
.CovarianceEngine
()
/*LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'*/
BEGIN
/* 定义变量一 /
DECLARE done, done2 INT DEFAULT 0;
DECLARE stockNo_a VARCHAR(6);
DECLARE coefficient DOUBLE(16,14);
/ 定义光标 */
DECLARE _Cur CURSOR FOR
SELECT DISTINCT stock_no FROM history_day;
1 |
|
DELIMITER ;
错误代码: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF;
UNTIL done END REPEAT;
CLOSE _Cur;
END' at line 65