update table for adding,updating