关于游标问题!谢谢
declare @storid char(4),declare @ordnum varchar(20),
declare @orddate datetime,
declare @titleid tid
declare curSales scroll cursor
for
select stor_id,ord_num,,ord_date,title_id
from sales
for read only
open curSales
fetch next from curSales into
@storid ,
@ordnum ,
@orddate,
@titleid
where @@fetch_status=0
begin
print +@storid
print +@ordnum
print +@orddate
print +@titleid
print ''
fetch next from curSales into
@storid ,
@ordnum ,
@orddate,
@titleid
end
close curSales
为什么不能通过呢!我看没有语法错误啊!
这是pubs数据库里的sales表
[此贴子已经被作者于2007-4-26 10:24:28编辑过]