2020
10-30
10-30
mysql split函数用逗号分隔的实现
1:定义存储过程,用于分隔字符串DELIMITER$$USE`mess`$$DROPPROCEDUREIFEXISTS`splitString`$$CREATEDEFINER=`root`@`%`PROCEDURE`splitString`(INf_stringVARCHAR(1000),INf_delimiterVARCHAR(5))BEGINDECLAREcntINTDEFAULT0;DECLAREiINTDEFAULT0;SETcnt=func_get_splitStringTotal(f_string,f_delimiter);DROPTABLEIFEXISTS`tmp_split`;CREATETEMPORARYTABLE`tmp_split`(`...
继续阅读 >