テーブルの更新後にトリガーを作成したい。このテーブルで更新クエリを実行するときに、他のテーブルに変更を加えたいと思います。したがって、影響を受ける行の数が0より大きいかどうかを知る必要があります。
正確なシナリオ:
Table: table_user
userid (primary key)
no_changes_status (true means no update has been made on table_website for this userid)
Table: table_website
userid (reference key)
website_url (when the value of this field is changed, no_changes_status should be set to false)
table_websiteでトリガーを作成し、挿入と更新ごとにnumber_of_affected_rowsをチェックします。number_of_affected_rowsが0より大きい場合、トリガーはno_changes_statusをfalseにします。
トリガーのnumber_of_affected_rowsを決定するために使用できる構文/関数が見つかりません。
MySQLフォーラムで他の誰かがほぼ同じ質問をします