forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
31 lines
6.2 KiB
HTML
31 lines
6.2 KiB
HTML
<a name="EN-US_TOPIC_0000001188521088"></a><a name="EN-US_TOPIC_0000001188521088"></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>
|
|
</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>
|
|
<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>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_71.html">Creating Regular Table</a></div>
|
|
</div>
|
|
</div>
|
|
|