(1)一次只能刪除乙個儲存過程或者函式。注意,要具有alter routine許可權
(2)刪除語句:
drop [if exists] sp_name
示例語句:
drop procedure film_in_stock;
(3)可以檢視儲存過程,函式的狀態,定義等資訊,了解相關的基本情況
a. 檢視儲存過程或函式的狀態
show status [like 'pattern']
例:show procedure status like 'film_in_stock'\g
b.檢視儲存過程或函式的定義
show create sp_name
例:show create procedure film_in_stock \g
c.檢視information_schema.routines 了解儲存過程和函式的資訊
select *
from routines
where routine_name='film_in_stock'\g
檢視mysql儲存過程 mysql檢視儲存過程函式
查詢資料庫中的儲存過程和函式 select name from mysql.proc where db xx and type procedure 儲存過程 select name from mysql.proc where db xx and type function 函式 show proce...
mysql檢視儲存過程 mysql檢視儲存過程
查詢資料庫中的儲存過程和函式 select name from mysql.proc where db xx and type procedure 儲存過程 select from mysql.proc where db xx and type procedure and name xx selec...
MySQL 儲存過程 建立 檢視 呼叫 刪除
建立 delimiter create procedure my add in a int,in b int,out c int begin if a is null then set a 0 end if if b is null then set b 0 end if set c a b end...