忘了加代码了,如下:
declare @cnt int
select @cnt=2
declare c Cursor
scroll 
for select * from employee
open c
fetch absolute @cnt from c
while (select count(*) from employee)>= @cnt
begin
fetch absolute @cnt from c
select dateadd(yy,1,hire_date) from employee
select @cnt=@cnt+2
end
deallocate c
declare EmployeeCursor Cursor
scroll
for select * from employee where pub_id='0877'
open EmployeeCursor
fetch first from EmployeeCursor
while @@fetch_status=0
begin
fetch next from EmployeeCursor
end
deallocate EmployeeCursor