日期:2014-05-19  浏览次数:20553 次

请教这个游标出了什么问题
declare   s_sc_c   scroll   cursor
    for   select   s.sno,s.sname,sc.cno,c.cname,sc.credit
            from   student_infos   s,select_course   sc,course_infos   c
            where   s.sno=sc.sno   and   sc.cno=c.cno   and   sc.cno= '00002 '
    for   update   of   sc.credit

结果:
服务器:   消息   16957,级别   16,状态   4,行   2
在   READ   ONLY   游标上不能指定   FOR   UPDATE。

谢谢帮我捉虫。


------解决方案--------------------
declare s_sc_c scroll cursor dynamic
for select s.sno,s.sname,sc.cno,c.cname,sc.credit
from student_infos s,select_course sc,course_infos c
where s.sno=sc.sno and sc.cno=c.cno and sc.cno= '00002 '
for update of sc.credit
------解决方案--------------------
提示的因该是不能用 update 吧,
不知道LZ的 for update of sc.credit有什么用
------解决方案--------------------
for update of sc.credit。。。。。???