MySQL儲存過程相互呼叫

2022-03-29 15:42:58 字數 659 閱讀 7898

什麼都不說了上**:

方式一:

第乙個儲存過程:test1,引數如下:in `user_name` varchar(50),out `uid`  bigint(20)

begin

#routine body goes here...

declare u_id bigint(20) default11;

select `user_id` into uid from `tbl_useralias` where `alias` =

user_name

;end

第二個儲存過程:test2,引數如下:in `user_name` varchar(50)

begin

#routine body goes here...

declare uid bigint(20

);

call test1(

user_name

, uid);

select

uid;

end

執行test2,並傳遞乙個字串作為引數,例如:duhuo。

結果你會看到乙個uid=12321313131;

方式二:

觸發器與儲存過程的相互呼叫

觸發器與儲存過程互調 觸發器如何呼叫儲存過程 create trigger test on table for insert asexec 儲存過程名 go 儲存過程如何呼叫觸發器 create proc test asupdate table set insert table select del...

觸發器與儲存過程的相互呼叫

觸發器與儲存過程互調 觸發器如何呼叫儲存過程 create trigger test on table for insert asexec 儲存過程名 go 儲存過程如何呼叫觸發器 create proc test asupdate table set insert table select del...

C Matlab 相互呼叫

visualstudio2013 net4.0 matlab2015b 高版本的matlab對外置其它語言做得很方便了,並不需要一堆的配置。其它語言與matlab的互動操作也類似。基本思路 將matlab函式打包成dll檔案,聯合matlab資料支援dll mwarray.dll 交付給其它語言程式...