update sql query "where" clauses