DWS TG 910.211 version

Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
This commit is contained in:
2025-04-23 13:53:01 +00:00
committed by zuul
parent 7d82735858
commit a5e3903f6b
829 changed files with 25350 additions and 27561 deletions

View File

@ -1,30 +1,37 @@
<a name="EN-US_TOPIC_0000001188521088"></a><a name="EN-US_TOPIC_0000001188521088"></a>
<a name="EN-US_TOPIC_0000001860198789"></a><a name="EN-US_TOPIC_0000001860198789"></a>
<h1 class="topictitle1">Working with Constraints</h1>
<div id="body1584526252526"><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p8944447173712">You can perform the following operations after a table is created only for a Regular table:</p>
<ul id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_ul15566173063918"><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li45661030153914"><a href="#EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section179601011104415">Creating a Constraint</a></li><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li29353719915"><a href="#EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section4961111111449">Renaming a Constraint</a></li><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li68254392097"><a href="#EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section16961131134414">Dropping a Constraint</a></li></ul>
<div class="section" id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section179601011104415"><a name="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section179601011104415"></a><a name="en-us_topic_0185264979_section179601011104415"></a><h4 class="sectiontitle">Creating a Constraint</h4><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p53537404">Follow the steps below to add a new constraint to the existing table:</p>
<ol id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_ol12074594"><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li41562487"><span>Right-click the selected constraint of the table and select <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b13706614161956">Create constraint</strong>.</span><p><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p52176326">The <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b9112527162023">Add New Constraint</strong> dialog box is displayed prompting you to add information about the new constraint.</p>
</p></li><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li6563530"><span>Enter the <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b60010088161956">Constraint Name</strong>, <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b3219884161956">Check Expression</strong>, and click <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b4459371423562">Add</strong>. You can view the added constraint in the corresponding table.</span><p><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p11739537">Data Studio displays the status of the operation in the status bar<strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b129521585412"></strong>.</p>
<div class="note" id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_note185521559616"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p3714152195211">The status bar will show the name of the constraint if it has been provided in the <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b850911532218">Constraint Name</strong> field, or else the constraint name will not be displayed as it is created by database server.</p>
<h1 class="topictitle1">Managing Constraints</h1>
<div id="body1584526252526"><p id="EN-US_TOPIC_0000001860198789__p178062135317">Creating, dropping, and renaming constraints for a created table.</p>
<div class="note" id="EN-US_TOPIC_0000001860198789__note7332639195313"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001860198789__p83327397531">Constraints cannot be added to column-store tables.</p>
</div></div>
<div class="section" id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_section179601011104415"><h4 class="sectiontitle">Creating a Constraint</h4><ol id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_ol12074594"><li id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_li41562487"><span>Right-click the selected constraint of the table and select <strong id="EN-US_TOPIC_0000001860198789__b1977711213428">Create constraint</strong>.</span><p><p id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_p52176326">The <strong id="EN-US_TOPIC_0000001860198789__b16667383423">Add New Constraint</strong> dialog box is displayed prompting you to add information about the new constraint.</p>
<p id="EN-US_TOPIC_0000001860198789__p63617436524">There are three options of constraint type: CHECK, PRIMARY KEY, and UNIQUE. For details, see <a href="DWS_DS_72.html#EN-US_TOPIC_0000001860199097__en-us_topic_0185264992_section440110125279">Defining Table Constraints</a>.</p>
<p id="EN-US_TOPIC_0000001860198789__p11596178155911"><span><img id="EN-US_TOPIC_0000001860198789__image119936448581" src="figure/en-us_image_0000001813599132.png" width="497.42" height="333.73690000000005" title="Click to enlarge" class="imgResize"></span></p>
<p id="EN-US_TOPIC_0000001860198789__p156721856152018"></p>
</p></li><li id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_li6563530"><span>Enter the <strong id="EN-US_TOPIC_0000001860198789__b14854181417484">Constraint Name</strong>, <strong id="EN-US_TOPIC_0000001860198789__b14850121814816">Check Expression</strong>, and click <strong id="EN-US_TOPIC_0000001860198789__b19675124174815">Add</strong>. You can view the added constraint in the corresponding table.</span><p><p id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_p11739537">Data Studio displays the status of the operation in the status bar.</p>
<div class="note" id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_note1671415520521"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_p3714152195211">The status bar will show the name of the constraint if it has been provided in the <strong id="EN-US_TOPIC_0000001860198789__b10474456114916">Constraint Name</strong> field, or else the constraint name will not be displayed as it is created by database server.</p>
</div></div>
</p></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section4961111111449"><a name="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section4961111111449"></a><a name="en-us_topic_0185264979_section4961111111449"></a><h4 class="sectiontitle">Renaming a Constraint</h4><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p35297384">Follow the steps below to rename a constraint:</p>
<ol id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_ol49241002"><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li40515840"><span>Right-click the selected constraint and select <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b2835148416649">Rename Constraint</strong>.</span><p><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p6217281">The <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b2282220316659">Rename Constraint</strong> dialog box is displayed prompting you to provide the new name.</p>
</p></li><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li56503588"><span>Enter the constraint name and click <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b2909070216649">OK</strong>. Data Studio displays the status of the operation in the status bar<strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b1098162085018"></strong>.</span></li></ol>
<div class="section" id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_section4961111111449"><h4 class="sectiontitle">Renaming a Constraint</h4><p id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_p35297384">Follow the steps below to rename a constraint:</p>
<ol id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_ol49241002"><li id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_li40515840"><span>Right-click the selected constraint and select <strong id="EN-US_TOPIC_0000001860198789__b1871895111506">Rename Constraint</strong>.</span><p><p id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_p6217281">The <strong id="EN-US_TOPIC_0000001860198789__b12156101214513">Rename Constraint</strong> dialog box is displayed prompting you to provide the new name.</p>
</p></li><li id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_li56503588"><span>Enter the constraint name and click <strong id="EN-US_TOPIC_0000001860198789__b1324537205117">OK</strong>. Data Studio displays the status of the operation in the status bar.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section16961131134414"><a name="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_section16961131134414"></a><a name="en-us_topic_0185264979_section16961131134414"></a><h4 class="sectiontitle">Dropping a Constraint</h4><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p10681578">Follow the steps below to drop a constraint:</p>
<ol id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_ol1442311591551"><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li642335945513"><span>Right-click the selected constraint and select <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b16618335175312">Drop Constraint</strong>.</span><p><p id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_p52913817582">The <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b482911245516">Drop Constraint</strong> dialog box is displayed.</p>
</p></li><li id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_li201009136010"><span>Click <strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b6265441195620">OK</strong> to complete the operation successfully. Data Studio displays the status of the operation in the status bar<strong id="EN-US_TOPIC_0000001188521088__en-us_topic_0185264979_b6511111614316"></strong>.</span></li></ol>
<div class="section" id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_section16961131134414"><h4 class="sectiontitle">Dropping a Constraint</h4><p id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_p10681578">Follow the steps below to drop a constraint:</p>
<ol id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_ol1442311591551"><li id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_li642335945513"><span>Right-click the selected constraint and select <strong id="EN-US_TOPIC_0000001860198789__b15286153075218">Drop Constraint</strong>.</span><p><p id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_p52913817582">The <strong id="EN-US_TOPIC_0000001860198789__b9582124885213">Drop Constraint</strong> dialog box is displayed.</p>
</p></li><li id="EN-US_TOPIC_0000001860198789__en-us_topic_0185264979_li201009136010"><span>Click <strong id="EN-US_TOPIC_0000001860198789__b13644105115213">OK</strong> to complete the operation successfully. Data Studio displays the status of the operation in the status bar.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_71.html">Creating Regular Table</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_017.html">Creating a Regular Table</a></div>
</div>
</div>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>