create proc aa
@z varchar(100) --向表B插入的记录内容
as
declare @ii int,@gjz varchar(10)
select @ii=count(*),@gjz=关键字 from 表A where charindex(关键字,@z)<>0
if @ii<>0
insert 表C values(@gjz,substring(@z,len(@gjz)+1,len(@z)))
@z varchar(100) --向表B插入的记录内容
as
declare @ii int,@gjz varchar(10)
select @ii=count(*),@gjz=关键字 from 表A where charindex(关键字,@z)<>0
if @ii<>0
insert 表C values(@gjz,substring(@z,len(@gjz)+1,len(@z)))
@信息 varchar(100)
as
insert B values(信息)insert C(关键字,信息)
select 关键字,stuff(信息,1,len(关键字),'')
from A
where @信息 like 关键字+'%'