SELECT id, check_date, dorm_location, dorm_no, check_items, risk_status, found_risk, photos, rectify_person, rectify_time, submit_time, submitter, import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag FROM ledger_dorm_fire_safety WHERE del_flag = '0' update ledger_dorm_fire_safety set sync_flag = '1' where sync_flag = '0'