我在mysql中存儲過程。該過程被創建,但是當程序被稱爲我得到一個錯誤:mysql中使用存儲過程更新表
"Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor -> Query Editor and reconnect."
下面是該過程:
------------------------------------------------
drop procedure if exists update_per_det;
delimiter //
create procedure update_per_det(IN name varchar(30))
begin
DECLARE age1 int;
set age1=(select CalAge(name));
update per_det set age=age1 where username=name;
end;//
delimiter ;
我怎樣才能解決這個問題呢?
請了解如何格式化報價,代碼等閱讀常見問題以獲取更多信息。 – JonH 2012-03-30 13:37:19