【发布时间】:2017-08-04 07:36:22
【问题描述】:
这是我的 MySQL 程序。执行此操作时出现错误。
DELIMITER //
CREATE PROCEDURE GET_ORDER_HISTORY_LIST(IN distid int)
BEGIN
SELECT
ort.order_id,
ort.transaction_id,
ort.user_id,
ort.transaction_date,
ort.insert_by,
ort.organization_id,
odt.course_id,
count(odt.quantity),
ct.course_name,
ct.course_code
FROM cdp_order_master as ort
JOIN cdp_order_detail as odt ON odt.order_id = ort.order_id
JOIN cdp_course as ct ON ct.course_id = odt.course_id
WHERE ort.user_id = distid
GROUP BY ort.order_id
END //
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' at line 19
【问题讨论】:
标签: mysql stored-procedures mysql-error-1064