example:
------------------------------------------------
create table #t (ID int,Name varchar(20))
insert into #t select 1,'AAAA'
insert into #t select 2,'BBBB'
insert into #t select 3,'CCCC'
insert into #t select 4,'DDDD'
insert into #t select 5,'EEEE'
insert into #t select 6,'FFFF'
GO
update #t set Name = 'GGGG' where ID = 7
if @@rowcount<>0
insert into #t select 7,'GGGG'
select * from #t
--输出结果
ID Name
--- ----
1 AAAA
2 BBBB
3 CCCC
4 DDDD
5 EEEE
6 FFFF
7 GGGG