欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

mysql 返回查詢數量,如何接收函數返回值

錢良釵2年前37瀏覽0評論
mysql 返回查詢數量,如何接收函數返回值?mysql中要獲得存儲過程的返回值,可以增加一個out參數,用來返回。mysql中存儲過程的例子:CREATE PROCEDURE addvoucher (IN userid INT,IN voucherid INT,OUT result INT)BEGINSELECT@endate_a := endate ,@batch_a := batch ,@c_count_a := c_count,@isdead_a := isdeadFROMt_voucherWHEREid = voucherid;SET autocommit = 0;IF EXISTS (SELECT*FROMt_user_voucher tuv,t_voucher tvWHEREtv.id = tuv.voucheridAND tv.batch =@batch_a) THENSET result = 1;-- 已存在SELECTresult;ELSEIF @c_count_a > 0 THENIF (TO_DAYS(@endate_a) - TO_DAYS(NOW())) > 0 THEN