declare cursor_xs cursor for
select * from 学生表
open cursor_xs
fetch next from cursor_xs
while @@fetch_status=0
begin
fetch next from cursor_xs
end
close cursor_xs
deallocate cursor_xs
参考资料:http://msdn.microsoft.com/zh-tw/library/ms180169%28v=SQL.100%29.aspx