update table and Query