色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

mysql 返回查詢數(shù)量,如何接收函數(shù)返回值

錢良釵2年前37瀏覽0評論
mysql 返回查詢數(shù)量,如何接收函數(shù)返回值?mysql中要獲得存儲過程的返回值,可以增加一個out參數(shù),用來返回。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