IN参数是只传入
OUT参数是只传出
INOUT参数是既传入又传入,即双向传递
指定参数为IN, OUT, 或INOUT 只对PROCEDURE是合法的。...AND tno=tn;
END LABEL_PROC //
delimiter ;
C语言调用
#include
include "mysql.h"
int main...= mysql_init (NULL);
//下面连接的最后一个参数必须为CLIENT_MULTI_STATEMENTS,不然就会报错select error: PROCEDURE *** can’...CLIENT_MULTI_STATEMENTS);
sprintf (buf, "call cal_grade(%d,%d,@t,%f,%s,%s)", 10, 10, 0.3, 123, 456);
if ( mysql_query...mysql_query (my_connection, "select @t");
res_ptr = mysql_store_result (my_connection);