doc-exports/docs/dws/dev/dws_06_0266.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 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-05-16 07:24:04 +00:00

32 lines
3.3 KiB
HTML

<a name="EN-US_TOPIC_0000001188429062"></a><a name="EN-US_TOPIC_0000001188429062"></a>
<h1 class="topictitle1">ROLLBACK</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001188429062__scd19ce04de97433b943431884cf097da"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001188429062__en-us_topic_0059778963_p36237812610">Rolls back the current transaction and backs out all updates in the transaction.</p>
<p id="EN-US_TOPIC_0000001188429062__a423a5f536aa5460980b83bd002487c38"><strong id="EN-US_TOPIC_0000001188429062__b35548724113845">ROLLBACK</strong> backs out of all changes that a transaction makes to a database if the transaction fails to be executed due to a fault.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001188429062__s33ad7577126142409c9ec180dcdbd2a8"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001188429062__a727a213821f44344865d9c4288185fda">If a <strong id="EN-US_TOPIC_0000001188429062__b84235270616435">ROLLBACK</strong> statement is executed out of a transaction, no error occurs, but a warning information is displayed.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001188429062__s86ea3228016f4531a27fa9f5d4e187ff"><h4 class="sectiontitle">Syntax</h4><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188429062__sf2218b208fa04efabf21a2d18eda5f9f"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">ROLLBACK</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="k">WORK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">TRANSACTION</span><span class="w"> </span><span class="p">];</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001188429062__s13207e3ba0e7423eafba28dd7914a979"><h4 class="sectiontitle">Parameter Description</h4><p id="EN-US_TOPIC_0000001188429062__aec6108d6b4ad4ee9b2f9d82e9589ea10"><strong id="EN-US_TOPIC_0000001188429062__a5beb5a96f4084198a4bd070f361c6e62">WORK | TRANSACTION</strong></p>
<p id="EN-US_TOPIC_0000001188429062__a6d877e314ff54450b852a246e7b5dec2">Optional keyword that more clearly illustrates the syntax.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001188429062__section151231358162611"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001188429062__p111052181802">Undo all changes in the current transaction:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188429062__screen912375882617"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">ROLLBACK</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001188429062__see1e2fee411b4c5f81ef8f42b656cacf"><h4 class="sectiontitle">Helpful Links</h4><p id="EN-US_TOPIC_0000001188429062__aee0670740adc428497286d62f2df7206"><a href="dws_06_0259.html">COMMIT | END</a></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0254.html">TCL Syntax</a></div>
</div>
</div>