Use db1declare my_cursor cursor scroll dynamic / * scroll indicates that the cursor pointer (otherwise only moving forward), Dynamic means reading and writing a cursor (otherwise the cursor read only) * / forselect Name from profile
open my_cursordeclare @name sysnamefetch next from my_cursor into @namewhile (@@ fetch_status = 0) begin print 'Name:' @name fetch next from my_cursor into @name endfetch first from my_cursor into @nameprint @ name / * update personal data set name = 'zzg' where current of my_cursor * // * delete from profile Where current of my_cursor * / close my_cursordeallocate my_cursor