I am new to stored procedures....Below is some code that updates one table based on another table. It works, but is this the most efficient way to do this. It seems to take a while to run.if exists (SELECT company.cmp_primaryphone, company.cmp_secondaryphone, company.cmp_contact FROM orderheader INNER JOIN company ON orderheader.ord_consignee = company.cmp_id WHERE orderheader.mov_number = @mov)BeginDECLARE @phone1 char(20)DECLARE @phone2 char(20)DECLARE @email char(30)DECLARE c1 CURSOR FORSELECT company.cmp_primaryphone, company.cmp_secondaryphone, company.cmp_contactFROM orderheader INNER JOIN company ON orderheader.ord_consignee = company.cmp_idWHERE (orderheader.mov_number = @mov)OPEN c1FETCH NEXT FROM c1INTO @phone1, @phone2, @emailIf @@FETCH_STATUS = 0BEGINUpdate OrderheaderSet ord_extrainfo7 = @phone1 ,ord_extrainfo8 = @phone2 ,ord_extrainfo9 = @email Where mov_number = @movENDCLOSE c1DEALLOCATE c1 End