标签:style class blog c code tar
创建存储过程:
1 delimiter // 2 create procedure printname (id int,out name char(50) ) 3 begin 4 select user into name from user where id=id; 5 end 6 // 7 delimiter ;
调用存储过程:
1 call printname(1,@a); 2 select @a;
创建函数:
1 delimiter // 2 create function hi(s char(20)) returns char(50) 3 return concat(‘hello,‘,s,‘l‘); 4 // 5 delimiter;
调用函数:
1 select hi(‘world!‘);
标签:style class blog c code tar
原文地址:http://www.cnblogs.com/canbefree/p/3741822.html