doc-exports/docs/dws/dev/dws_04_0542.html
Lu, Huayi ef0ada5a59 DWS DEV 20240716 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-11-02 09:07:47 +00:00

17 lines
2.1 KiB
HTML

<a name="EN-US_TOPIC_0000001460722544"></a><a name="EN-US_TOPIC_0000001460722544"></a>
<h1 class="topictitle1">Other Statements in a GaussDB(DWS) Stored Procedure</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001460722544__section9461943114818"><h4 class="sectiontitle">Lock Operations</h4><p id="EN-US_TOPIC_0000001460722544__en-us_topic_0059778249_p655714596220"><span id="EN-US_TOPIC_0000001460722544__text14381364347">GaussDB(DWS)</span> provides multiple lock modes to control concurrent accesses to table data. These modes are used when Multi-Version Concurrency Control (MVCC) cannot give expected behaviors. Alike, most <span id="EN-US_TOPIC_0000001460722544__text1245379961">GaussDB(DWS)</span> commands automatically apply appropriate locks to ensure that called tables are not deleted or modified in an incompatible manner during command execution. For example, when concurrent operations exist, <strong id="EN-US_TOPIC_0000001460722544__b99128699493142">ALTER TABLE</strong> cannot be executed on the same table.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001460722544__section127591758124812"><h4 class="sectiontitle">Cursor Operations</h4><p id="EN-US_TOPIC_0000001460722544__en-us_topic_0059777587_p15682972236"><span id="EN-US_TOPIC_0000001460722544__text71677545348">GaussDB(DWS)</span> provides cursors as a data buffer for users to store execution results of SQL statements. Each cursor region has a name. Users can use SQL statements to obtain records one by one from cursors and grant them to master variables, then being processed further by host languages.</p>
<p id="EN-US_TOPIC_0000001460722544__ad94cd9b54eaf41f69ff0d374ac734227">Cursor operations include cursor definition, open, fetch, and close operations.</p>
<p id="EN-US_TOPIC_0000001460722544__a829d32257c314c18b3ade658f56d4992">For the complete example of cursor operations, see <a href="dws_04_0547.html">Explicit Cursor</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0512.html">GaussDB(DWS) Stored Procedure</a></div>
</div>
</div>