すべてのプロダクト
Search
ドキュメントセンター

Data Transmission Service:FOR UPDATE OFはサポートされていません

最終更新日:Oct 22, 2024

背景情報

Oracleでは、Select for updateFor update of列構文がサポートされています。 これらはどちらも、単一のテーブルの条件を満たす関連行をロックしています。 複数のテーブルの場合、For updateは複数のテーブルの条件に一致する行をロックしますが、For update ofは対応するテーブルの行を条件に基づいてロックします。 例:

  • シングルテーブル

    select * from test where id =10 for update

    select * from test id=10 for update id

    説明

    id=10の行をロックします。

  • 複数のテーブル

    select * from test inner join t1 on test.id=t1.idここでtest.id=10 for update

    select * from test inner join t1 on test.id=t1.idここでtest.id=10テストの更新

    説明

    testとt1の行をid=10でロックします。

新しいソリューション

現在、PolarDBはFor update構文のみをサポートしており、For update構文はサポートしていません。 ビジネス状況に応じて、適切に更新の構文を調整できます。