Updating multiple tables in sql