结果由多行组成

时间:2013-12-16 07:57:24

标签: mysql sql triggers

我运行两个简单的查询,但MySQL显示错误消息,不明白为什么。

选择

SELECT proy_obs FROM proy WHERE proy_cod = 'C-12-001';
+-------------+
| proy_obs    |
+-------------+
|             |
+-------------+
1 row in set (0.00 sec)

更新

UPDATE proy SET proy_obs = 'Test' WHERE proy_cod = 'C-12-001';
ERROR 1172 (42000): Result consisted of more than one row

MySQL版本:

mysql  Ver 14.14 Distrib 5.1.71, for redhat-linux-gnu (x86_64) using readline 5.1

1 个答案:

答案 0 :(得分:2)

看起来您的桌面上定义了一个导致问题的触发器。

要查看它,请运行

select trigger_name 
  from information_schema.triggers 
 where trigger_schema = schema()
   and event_object_table = 'proy';