forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
37 lines
5.4 KiB
HTML
37 lines
5.4 KiB
HTML
<a name="EN-US_TOPIC_0000001860198789"></a><a name="EN-US_TOPIC_0000001860198789"></a>
|
|
|
|
<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_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_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_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> |