在mysql中创建函数不成功(确定能创建函数)CREATE function SplitString( String varchar(2048), SplitChar char)returns res table( Value varchar(128), vindex int)begin declare index int,unit varchar(128),inext int,len int,i int; set index=1; set i=1; set len=len(String); while index<=len begin set inext=charindex(SplitChar,String,index); if inext=0 set inext=len+1; if inext>index begin set unit=ltrim(rtrim(substring(String,index,inext-index))); if unit<>'' begin insert into res (value,vindex) values (unit,i); set i=i+1; end; end; set index=inext+1; end; return;end;源代码来自于http://www.cnblogs.com/lucc/archive/2009/02/14/1390384.html截个图给大侠们看看,,
暮色呼如
繁花不似锦
相关分类