Home >Database >Mysql Tutorial >mysql存储过程实例分享_MySQL

mysql存储过程实例分享_MySQL

WBOY
WBOYOriginal
2016-06-01 13:17:11998browse

一个mysql存储过程实例代码。

mysql存储过程

delimiter $DROP FUNCTION IF EXISTS `fun_convert`$CREATE DEFINER=`root`@`%` FUNCTION `fun_convert`(para varchar(255))RETURNS varchar(255) CHARSET gbkBEGINdeclare result varchar(255) default '';declare cnt int default 0;declare i int default 0;declare id BIGINT default 0;set cnt = length(para) - length(replace(para,',',''))-1;WHILE i 
    
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn