表名:ZL_StripeHtmlTag

简要说明:

ZL_StripeHtmlTag

GO

CREATE FUNCTION [dbo].[ZL_StripeHtmlTag](@cont varchar(max))

returns varchar(max)

as

begin

declare @tem varchar(max),@i int,@j int;

set @tem = replace(ISNULL(@cont,''),' ','');

set @i = charindex('<',@tem,0);

set @j = charindex('>',@tem,1);

while @i < @j

begin

select @tem = replace(@tem,SUBSTRING(@tem,@i,@j-@i+1),'')

set @i = charindex('<',@tem,0);

set @j = charindex('>',@tem,1);

end

return @tem

end


--注意:将清空全表数据

detele from ZL_StripeHtmlTag

--注意:将删除整个表

drop table ZL_StripeHtmlTag

--注意:清空且复位表ID序列为初始值

TRUNCATE table ZL_StripeHtmlTag