update SQL for select, update, delete condition