delimiter $$ drop function if exists get_child_list$$ create function get_child_list(in_wgbm varchar(1000)) returns varchar(1000) begin declare wgbms varchar(1000) default ''; declare tempwgbms varchar(1000); set tempwgbms = in_wgbm; while tempwgbms is not null do set wgbms = CONCAT_WS(',',wgbms,tempwgbms); select GROUP_CONCAT(wgbm) into tempwgbms from grid_org_info where FIND_IN_SET(wgbm,tempwgbms)>0; end while; return wgbms; end $$ delimiter ; 老是报错Data too long for column 'wgbms' at row 1