一、條件定義
DECLARE condition_name CONDITION FOR condition_vale
condition_value:
CLARE htype HANDLER FOR cond_value[...] sp_statement
handtype_value :
sqlstate [value] saltate_value
|contentname
|sqlwarning
|not sql>select max(id) from ac
maxid =200;
1row in set (0.00 sec)
mysql->delimiter $$
mysql>
mysql>create proced =1;
->nsert intoactor(id)values(201)
->sex @x=2;
insert into actor(id)values(202)
->set @x=3; ->end
->$$
query ok, 0 rows afftected (0.00 sec)
mysql->delimiter;
mysql>call actor_insert();lic
. primarymysql->select @x;@x2011row in set (0.00 sec)從上面可以看出當主鍵重複時,不會做其儲存過程條件定義與處理的內容,更多相關內容請關注PHP中文網(www.php.cn)!