我有这个存储过程:
DROP PROCEDURE IF EXISTS buildMySomething;
CREATE PROCEDURE buildMySomething()
BEGIN
UPDATE current_amount SET current_m_amount = 2 WHERE m_id = 1;
END //
这给了我以下错误:ERROR 1054 (42S22): Unknowing column 'current_m_amount' in 'field list'
在互联网上环顾四周后,对我来说很明显,如果列不存在、意外字符或只是语法错误(他们输入了错误的列名),人们会收到此错误......但是......我无数次检查这些可能性。我在这里想念什么?
+--------------------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+---------+------+-----+---------+----------------+
| m_id | int(11) | NO | PRI | NULL | auto_increment |
| current_m_amount | int(11) | NO | | NULL | |
+--------------------+---------+------+-----+---------+----------------+