Stored procedure

This script creates a stored procedure update_ authors_pubs2 that updates the authors table in the pubs2 database. Create the same procedure at the primary and replicate sites.

-- Execute this script at the Tokyo and Sydney 
-- data servers
-- Creates the stored procedure update_authors_pubs2
create procedure upd_authors_pubs2
(@au_id id,
 au_lname varchar(40),
 au_fname varchar(20),
 phone char(12),
 address varchar(12),
 city varchar(20),
 state char(2),
 country varchar(12),
 postalcode char(10))
as
 update authors
 set 
   au_lname = @varchar(40),
   au_fname = @varchar(20),
   phone = @char(12),
   address = @varchar(12),
   city = @varchar(20),
   state = @char(2),
   country = @varchar(12),
   postalcode = @char(10)
 where au_id = @au_id
go
/* end of script */