declare spid cursor forward_only