use pubs Go declare @auid char(12),@aulname varchar(20),@aufname varchar(20), @st char(2),@auinfo varchar(50) declare auth_cur cursor for select au_id, au_lname, au_fname, state from authors open auth_cur fetch next from auth_cur into @auid,@aulname,@aufname, @st while (@@fetch_status=0) begin print ‘作者编号: ‘+@auid print ‘作者姓名: ‘+@aulname+‘,‘+@aufname print ‘所在州: ‘+@st print ‘--------------------------‘ fetch next from auth_cur into @auid,@aulname,@aufname, @st end close auth_cur deallocate auth_cur