2012-03-30 3 views
2

mysql에 프로 시저를 저장했습니다. 절차는 만들어 지지만 프로 시저를 호출 할 때 오류가 발생합니다 :저장 프로 시저를 사용하는 mysql의 테이블 업데이트

------------------------------------------------ 
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 ; 

가 어떻게이 문제를 해결할 수 있습니다 :

다음

"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."

이 절차입니까?

+0

자세한 내용은 FAQ를 읽어 등을 인용, 코드를 포맷하는 방법하시기 바랍니다. – JonH

답변

2

이 시도 :

set age1=(select CalAge(name)); 

SET SQL_SAFE_UPDATES=0; 

update per_det set age=age1 where username=name; 
+0

urs rsuits working – mani

+0

감사합니다 귀하의 질문/문제가 해결되면 답변으로 내 게시물을 받아주십시오. http://meta.stackexchange.com/a/5235 –

관련 문제