Mysql uses the stored procedure to achieve the effect similar to split. Foreground: the keywords in the database are separated by ";", and the query result set is sorted in descending order according to the number of keyword frames, and display it on the page according to a single keyword. The following is the Stored PROCEDURE Java code create procedure 'proc _ split '(inputstring varchar (1000), delim char (1 )) not deterministic contains SQL SECURITY DEFINER COMMENT ''begin declare strlen int; declare last_index int; declare cur_index int; declare cur_char VARCHAR (200); declare len int; set cur_index = 1; set last_index = 0; set strlen = length (inputstring); drop temporary table if exists splittable; create TEMPORARY table splittable default charset = utf8 (id int AUTO_INCREMENT, value VARCHAR (20 ), primary key ('id'), unique key 'id' ('id'); WHILE (cur_index <= strlen) DO begin if substring (inputstring from cur_index for 1) = delim or cur_index = strlen then set len = cur_index-last_index-1; if cur_index = strlen then set len = len + 1; end if; insert into splittable ('value ') values (substring (inputstring from (last_index + 1) for len); set last_index = cur_index; end if; set cur_index = cur_index + 1; END; end while; /* test */call proc_split ('a; B; c; D', ';'); select * from splittable; it is only suitable for processing a single word, we may encounter a situation where all fields (each field may contain only one keyword or multiple keywords) are processed into one multi-keyword, with an SQL statement, you can select group_concat (name separator ';') as tags from tags where LENGTH (name)> 0 parameter description: LENGTH (name)> fields with 0 being null are not processed.