delimiter $$ drop procedure if exists test_at $$ create definer=root@localhost procedure test_at() begin declare i2 int default 0; select count(*) into i2 from test_table; select i2; end $$ delimiter;
计算mysql表的函数,并且赋值给变量
这里是把值赋给i2的
delimiter $$ drop procedure if exists test_at $$ create definer=root@localhost procedure test_at() begin declare i2 int default 0; select count(*) into i2 from test_table; select i2; end $$ delimiter;
计算mysql表的函数,并且赋值给变量
这里是把值赋给i2的