忘了加代码了,如下:
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
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
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货