MySQL一條語句實現同時查詢和修改

UPDATE slope_alarm AS A INNER JOIN (SELECT alarm_id FROM slope_alarm WHERE alarm_state =0) AS B ON A.alarm_id=B.alarm_id SET A.alarm_state=2
相關文章
相關標籤/搜索