declare @name varchar(20) declare @titel varchar(20) declare prof_cursor cursor for select p.name, v.titel from professoren p, vorlesungen v where p.persnr=v.gelesenvon open prof_cursor fetch next from prof_cursor into @name, @titel while @@fetch_status = 0 begin print @name + ' ' + @titel fetch next from prof_cursor into @name, @titel end close prof_cursor deallocate prof_cursor