简单
DECLARE C1 CURSOR FOR
SELECT ... form ....
怎么判断 定义CURSOR的那个查询语句查询出来纪录结果是不是0条
简单吧?
谢谢
------解决方案--------------------错了,应该是
@@fetch_stauts=0
------解决方案--------------------DECLARE abc1_cursor CURSOR FOR
SELECT acceid FROM t_ABC
open abc1_cursor
fetch next from abc1_cursor
if @@FETCH_STATUS= 0
while @@FETCH_STATUS =0
begin
...........
end