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>
438 lines
65 KiB
HTML
438 lines
65 KiB
HTML
<a name="EN-US_TOPIC_0000001234200603"></a><a name="EN-US_TOPIC_0000001234200603"></a>
|
|
|
|
<h1 class="topictitle1">Overview</h1>
|
|
<div id="body1584526252525"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p138714402177">This section describes how to create a common table.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p46361647">A table is a logical structure maintained by a database administrator and consists of rows and columns. You can define a table as a part of your data definitions from the data perspective. Before defining a table, you need to define a database and a schema. This section describes how to use Data Studio to create a table. To define a table in the database, perform the following steps:</p>
|
|
<ol id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ol14601640"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li37014815"><span>In the <strong id="EN-US_TOPIC_0000001234200603__b155999621093546">Object Browser</strong> pane, right-click <strong id="EN-US_TOPIC_0000001234200603__b190700862893546">Regular Tables</strong>, and choose <strong id="EN-US_TOPIC_0000001234200603__b14803145993546">Create Regular Table</strong>.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li19241577"><span>Define basic table information, such as the table name and table type. For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section1344143101920">Providing Basic Information</a>.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li38956471"><span>Define column information, such as the column name, data type schema, data type, and column constraint. For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section546323424">Defining a Column</a>.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li15063922"><span>For details about how to determine table data distribution settings, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section728115301265">Selecting Data Distribution</a>.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li42854387"><span>Define column constraints for different constraint types. Constraint types include <strong id="EN-US_TOPIC_0000001234200603__b107568033893546">PRIMARY KEY</strong>, <strong id="EN-US_TOPIC_0000001234200603__b86396621893546">UNIQUE</strong>, and <strong id="EN-US_TOPIC_0000001234200603__b159571408393546">CHECK</strong>. For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section440110125279">Defining Table Constraints</a>.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li48653295"><span>Define table index information, such as the index name and access mode. For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section082554911302">Defining an Index</a>.</span><p><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p35226478">On the <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b42847491442">SQL Preview</strong> tab, you can check the automatically generated SQL query. For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section7772325171112">SQL Preview</a>.</p>
|
|
</p></li></ol>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section1344143101920"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section1344143101920"></a><a name="en-us_topic_0185264992_section1344143101920"></a><h4 class="sectiontitle">Providing Basic Information</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p5099437">If you create a table in a schema, the current schema will be used as the schema of the table. Perform the following steps to create a common table:</p>
|
|
</div>
|
|
<ol id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ol1011416419451"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li1611011416456"><span>Enter a table name. It specifies the name of the table to be created.</span><p><div class="note" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_note13606184814811"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p560714488481">Select the <strong id="EN-US_TOPIC_0000001234200603__b108605864993546">Case</strong> check box to retain the capitalization of the value of the <strong id="EN-US_TOPIC_0000001234200603__b116248632493546">Table Name</strong> parameter. For example, if you enter the table name <strong id="EN-US_TOPIC_0000001234200603__b74995646693546">Employee</strong>, the table name will be created as <strong id="EN-US_TOPIC_0000001234200603__b16155041593546">Employee</strong>.</p>
|
|
</div></div>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p7383539154818">The name of the table schema is displayed in <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b14510125316453">Schema</strong>.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li181101441114512"><span>Select a table storage mode from the <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b728024124618">Table Orientation</strong> drop-down list.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li14111104154512"><span>Select a table type. Its value can be:</span><p><ul id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ul181112041124519"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li12111114124519"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b3519124604612">Normal</strong>: a normal table</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li31111841104518"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b979144964612">Unlogged</strong>: An unlogged table. When data is written to an unlogged table, the data is not recorded in logs. The speed of writing data to an unlogged table is much higher than that of writing data to a common table. However, an unlogged table is insecure. In the case of a conflict or abnormal shutdown, an unlogged table is automatically truncated. The content of unlogged tables is not backed up to the standby node, and no log is automatically recorded when an index is created for unlogged tables.</li></ul>
|
|
</p></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li1711310414456"><span>Configure <strong id="EN-US_TOPIC_0000001234200603__b177612504493546">Options</strong>.</span><p><ul id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ul8111941194518"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li7111144119454"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b27485199470">IF NOT EXISTS</strong>: Create the table only if a table with same name does not exist.</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li11111841144519"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b16324183015479">WITH OIDS</strong>: Create a table and assign OIDs.</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li3111154115453">Configure <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b256211372471">Filler Factor</strong>. The value range is 10 to 100. The default value is 100 (filled to capacity).</li></ul>
|
|
<p class="litext" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p811384114513">If <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b20236145554717">Fill Factor</strong> is set to a smaller value, the INSERT operation fills only the specified percentage of a table page. The free space of the page will be used to update rows on the page. In this way, the UPDATE operation can place the updated row content on the original page, which is more efficient than placing the update on a different page. Set it to 100 for a table that has never been updated. Set it to a smaller value for largely updated tables. TOAST tables do not support this parameter.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li1111316417456"><span>Enter table description in the <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b651418813481">Description of Table</strong> text box.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li811354111451"><span>Click <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b4553414184812">Next</strong> to define the column information of the table.</span></li></ol>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p12261704572">You can configure the following parameters of a common table:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_table5353120191914" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row133549208195"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.7.2.5.1.1"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p16158113113198">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.7.2.5.1.2"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p11874311194"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b19575794316">Row-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.7.2.5.1.3"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1021863181917"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b19586714436">Column-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.7.2.5.1.4"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1225033131916"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b3959274434">ORC Table</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1735692031911"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p184801331121914">Table Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p9514231151910"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image18530203116191" src="figure/en-us_image_0000001233800817.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p15691831201910"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image1258518310195" src="figure/en-us_image_0000001188202704.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p18624631121913"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image10642123181915" src="figure/en-us_image_0000001234042261.png"></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row035716206199"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1696431121913">If Not Exists</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p17733231121913"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image7749031201911" src="figure/en-us_image_0000001188521224.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p378833141919"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image780853141914" src="figure/en-us_image_0000001233922307.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p188421331171918"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image1386033111192" src="figure/en-us_image_0000001234200743.png"></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row193581220141914"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1590663115192">With OIDS</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p179351631111910"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image1595223191910" src="figure/en-us_image_0000001233800819.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p109821531191915"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image82632121916" src="figure/en-us_image_0000001233800813.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p34314320196"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image5574329193" src="figure/en-us_image_0000001188681140.png"></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row335952020199"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p310515321195">Fill Factor</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p514312328193"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image19168232121910" src="figure/en-us_image_0000001234200747.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p920533218194"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image17220123212194" src="figure/en-us_image_0000001188521220.png"></span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p11252123241918"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image112711032181910" src="figure/en-us_image_0000001188362668.png"></span></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section546323424"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section546323424"></a><a name="en-us_topic_0185264992_section546323424"></a><h4 class="sectiontitle">Defining a Column</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p3251468">A column defines a unit of information within a table's row. Each row is an entry in the table. Each column is a category of information that applies to all rows. When you add a table to a database, you can define the columns that compose it. Columns determine the type of data that the table can hold. After providing the general information about the table, click the <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b136221235104811">Columns</strong> tab to define the list of table columns. Each column contains name, data type, and other optional properties.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p29263214">You can perform the following operations only in a common table:</p>
|
|
<ul id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ul62042342"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li48013695193942"><a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section165532164212">Deleting a Column</a></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li26816793194021"><a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section171818329428">Editing a Column</a></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li18006792194030"><a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section16456451142110">Moving a Column</a></li></ul>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p21510172">To define a column, perform the following steps:</p>
|
|
<ol id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ol122111946105116"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li1321020466510"><span>Enter the column name in <strong id="EN-US_TOPIC_0000001234200603__b163329114204">Column Name</strong> field. It specifies the name of a column to be created in the new table. This must be a unique name in the table.</span><p><div class="note" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_note15915520524"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1660175514525">Select the <strong id="EN-US_TOPIC_0000001234200603__b171501873893546">Case</strong> check box to retain the capitalization of the value of the <strong id="EN-US_TOPIC_0000001234200603__b154989936393546">Column Name</strong> parameter. For example, if the column name entered is "Name", then the column name is created as "Name".</p>
|
|
</div></div>
|
|
</p></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li5210346125120"><span>Configure <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b63984492">Array Dimensions</strong>. It specifies the array dimensions for the column.</span><p><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p6462141115424"><strong id="EN-US_TOPIC_0000001234200603__b1210211472224">Example:</strong> If array dimension for a column is defined as integer [], then it will add the column data as single dimension array.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p6447194744610"><span><img id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_image13447847144618" src="figure/en-us_image_0000001188681144.jpg"></span></p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p876884311">The marks column in the above table was created as single dimension and subject column as two dimensions.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li162101646115120"><span>Select the data type of the column from the <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b955512184913">Data Type</strong> drop-down list. For example, <strong id="EN-US_TOPIC_0000001234200603__b5352153917245">bigint</strong> for integer values.</span><p><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1021014615513">For complex data types,</p>
|
|
<ul id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ul7210346145113"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li172101946135120">Select the required schema from the <strong id="EN-US_TOPIC_0000001234200603__b1690171482511">Data type Schema</strong> drop-down list.</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li1921012462518">Select the corresponding data type from the <strong id="EN-US_TOPIC_0000001234200603__b38382617278">Data Type</strong> drop-down list. This list displays the tables and views for the selected schema.<div class="note" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_note39512584547"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p49517583541">User-defined data types are not available for selection.</p>
|
|
</div></div>
|
|
</li></ul>
|
|
</p></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li1921134613514"><span>Enter the precision/size value of the data type entered in the <strong id="EN-US_TOPIC_0000001234200603__b17279114942815">Precision/Size</strong> field. This parameter is valid only when the data type can be defined by precision or size.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li7211104635119"><span>Select the scale of the data type entered in the <strong id="EN-US_TOPIC_0000001234200603__b16669131312291">Scale</strong> field.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li162111646125118"><span>Choose the following <strong id="EN-US_TOPIC_0000001234200603__b9776193416296">Column Constraints</strong> if required:</span><p><ul class="subitemlist" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ul17211346115111"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li19211146145112"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b122119375010">NOT NULL</strong>: The column cannot contain null values.</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li1521174625114"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b138211953502">UNIQUE</strong>: The column may contain only unique values.</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li8100724181112"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b3769168175014">DEFAULT</strong>: The default value used when no value is defined for the column.</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li102111646105115"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b15258131125018">Check</strong>: An expression producing a Boolean result, which new or updated rows must satisfy for an INSERT or UPDATE operation to succeed.</li></ul>
|
|
</p></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li106213333555"><span>To add comments to <strong id="EN-US_TOPIC_0000001234200603__b105413171691">Column</strong> in the <strong id="EN-US_TOPIC_0000001234200603__b554217171919">Create Regular Table</strong> dialog box, add column information in <strong id="EN-US_TOPIC_0000001234200603__b154211713919">Description of Column (Max 5000 chars)</strong> text box and click <strong id="EN-US_TOPIC_0000001234200603__b15434171691">Add</strong>. You can also add comments in the column addition dialog box. You can check comments in general table properties.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li6211174625116"><span>After you enter all information for new column, click <strong id="EN-US_TOPIC_0000001234200603__b423319471203">Add</strong>. You can also delete a column from a list or change the order of columns. After defining all columns, click <strong id="EN-US_TOPIC_0000001234200603__b1123414474203">Next</strong>.</span></li></ol>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p107491657153915">You can configure the following parameters of a column in a common table:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_table1790484220" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row13801748827"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.8.8.2.5.1.1"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1483791314318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.8.8.2.5.1.2"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p138573138315"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b1910141213566">Row-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.8.8.2.5.1.3"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p387710131633"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b13406115115611">Column-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.8.8.2.5.1.4"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p6895161310311"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b7337121818564">ORC Table</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row14811748920"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1794513131437">Array Dimensions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p198531519472">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p56381448476">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p567644419477">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1082648226"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p12813141320">Data Type Schema</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p122692280473">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p8696444144716">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p97162442475">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row15831648828"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p040891417314">NOT NULL</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p4296192844718">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p82720328472">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p15441932174710">√</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row108412482214"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p125354141630">Default</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p931392812475">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p4592032104714">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p5741932174714">√</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row11851848123"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p265971414315">UNIQUE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1833422864712">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p2097174874714">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p7116154844712">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row18861481529"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p117978142315">CHECK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p18352172824713">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1913018488472">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.8.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p7146194884717">x</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section165532164212"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section165532164212"></a><a name="en-us_topic_0185264992_section165532164212"></a><h4 class="sectiontitle">Deleting a Column</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p66458099">To delete a column, perform the following steps:</p>
|
|
<ol id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ol61251980"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li14396914"><span>Select a column.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li26367774"><span>Click <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b162441436185017">Delete</strong>.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section171818329428"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section171818329428"></a><a name="en-us_topic_0185264992_section171818329428"></a><h4 class="sectiontitle">Editing a Column</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p55414911">Follow the steps to edit a column:</p>
|
|
<ol id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ol28972154"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li59422801"><span>Select a column.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li34004889"><span>Click <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b5616155112505">Edit</strong>.</span></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li2932635"><span>Edit the column details as required and click <strong id="EN-US_TOPIC_0000001234200603__b48161044111120">Update</strong> to save changes.</span><p><div class="note" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_note57516701"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p9107181115579">You must complete the edit operation and save the changes to continue with other operations.</p>
|
|
</div></div>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section16456451142110"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section16456451142110"></a><a name="en-us_topic_0185264992_section16456451142110"></a><h4 class="sectiontitle">Moving a Column</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p53181042">You can move a column in a table. To move a column, select the column and click <strong id="EN-US_TOPIC_0000001234200603__b173408615093546">Up</strong> or <strong id="EN-US_TOPIC_0000001234200603__b113066536893546">Down</strong>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section728115301265"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section728115301265"></a><a name="en-us_topic_0185264992_section728115301265"></a><h4 class="sectiontitle">Selecting Data Distribution</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p58309428">Data distribution specifies how the table is distributed or replicated among data nodes.</p>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p55022811">Select one of the following options for the distribution type:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_table29473656194152" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row31926277194152"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.14.1.3.1.1"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p509004419422"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b2287720219425">Distribution Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.14.1.3.1.2"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p964039219422"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b4111408419425">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row332500194152"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p4852450519422">DEFAULT DISTRIBUTION</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p3817085219422">The default distribution type will be assigned for this table.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row38030161194152"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p4348188019422">REPLICATION</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p3237138719422">Each row of the table will be replicated in all the data nodes of the database cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row46185521194152"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p4353029319422">HASH</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p3629282619422">Each row of the table will be placed based on the hash value of the specified column.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row153351130122319"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1938214272404">RANGE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1111261712137">Each row of the table will be placed based on the range value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1095123092311"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p142184413538">LIST</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.1.3.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p581517101148">Each row of the table will be placed based on the list value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p27662693">After selecting data distribution, click <strong id="EN-US_TOPIC_0000001234200603__b666615582119">Next</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1721917492618">The following table lists the data distribution parameters that can be configured for common tables.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_table109834401874" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Distribution types</caption><thead align="left"><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row6984164011714"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.17.2.5.1.1"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1389075318719"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b6562018195210">Distribution Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.17.2.5.1.2"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p08911153379"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b1957082012523">Row-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.17.2.5.1.3"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p189119531673"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b3694102210524">Column-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.17.2.5.1.4"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1989115538718"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b666019256523">ORC Table</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row109867409712"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p889116533713">DEFAULT DISTRIBUTION</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1786918385483">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p9883123894812">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p127581521104812">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row098713406713"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p789205315714">HASH</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p48966387485">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p20910173884815">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p88931653473">√</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row098811401073"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p8894753377">REPLICATION</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1924838154819">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p69401638104815">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.17.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p20457926184814">x</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section440110125279"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section440110125279"></a><a name="en-us_topic_0185264992_section440110125279"></a><h4 class="sectiontitle">Defining Table Constraints</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p17622742">Creating constraints is optional. A table can have one (and only one) primary key. Creating the primary key is a good practice.</p>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p24386950">You can select the following types of constraints from the <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b1324933517523">Constraint Type</strong> drop-down list:</p>
|
|
<ul id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ul18155963"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li56683477194250"><a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section29185940">Primary Key</a></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li51419061194321"><a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section61346876">UNIQUE</a></li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li9774911194348"><a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section15250979">CHECK</a></li></ul>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section29185940"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section29185940"></a><a name="en-us_topic_0185264992_section29185940"></a><h4 class="sectiontitle">Primary Key</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p50847687">The primary key is the unique identity of a row and consists of one or more columns.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p54976006">Only one primary key can be specified for a table, either as a column constraint or as a table constraint. The primary key constraint must name a set of columns that is different from other sets of columns named by any unique constraint defined for the same table.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p25022010">Set the constraint type to <strong id="EN-US_TOPIC_0000001234200603__b9350541393546">PRIMARY KEY</strong> and enter the constraint name. Select a column from the <strong id="EN-US_TOPIC_0000001234200603__b89378740993546">Available Columns</strong> list and click <strong id="EN-US_TOPIC_0000001234200603__b65717810893546">Add</strong>. If you need a multi-column primary key, repeat this step for another column.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p22657631"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b958012211547">Fill Factor</strong> for a table is in the range 10 and 100 (unit: %). The default value is 100 (filled to capacity). If <strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b141145835516">Fill Factor</strong> is set to a smaller value, the INSERT operation fills only the specified percentage of a table page. The free space of the page will be used to update rows on the page. In this way, the UPDATE operation can place the updated row content on the original page, which is more efficient than placing the update on a different page. Set it to 100 for a table that has never been updated. Set it to a smaller value for largely updated tables. TOAST tables do not support this parameter.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1067085724619"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b1645182820552">DEFERRABLE</strong>: Defer an option.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p28184617"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b77521531175517">INITIALLY DEFERRED</strong>: Check the constraint at the specified time point.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p52334961">In the <strong id="EN-US_TOPIC_0000001234200603__b206628519193546">Constraints</strong> area, click <strong id="EN-US_TOPIC_0000001234200603__b103410867393546">Add</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p31076309">You can click <strong id="EN-US_TOPIC_0000001234200603__b128966677593546">Delete</strong> to delete a primary key from the list.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p38942675">Mandatory parameters are marked with asterisks (*).</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section61346876"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section61346876"></a><a name="en-us_topic_0185264992_section61346876"></a><h4 class="sectiontitle">UNIQUE</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p240095">Set the constraint type to <strong id="EN-US_TOPIC_0000001234200603__b16092173293546">UNIQUE</strong> and enter the constraint name.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p31759435">Select a column from the <strong id="EN-US_TOPIC_0000001234200603__b49269253693546">Available Columns</strong> list and click <strong id="EN-US_TOPIC_0000001234200603__b61343711493546">Add</strong>. To configure unique for multiple columns, repeat this step for another column. After adding the first column, the UNIQUE constraint name will be automatically filled. The name can be modified.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p5720927"></p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1851681162014"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b1161003695615">Fill Factor</strong>: For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section29185940">Primary Key</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p5932184502012"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b92732398561">DEFERRABLE</strong>: For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section29185940">Primary Key</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p266012862115"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b20786242195619">INITIALLY DEFERRED</strong>: For details, see <a href="#EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section29185940">Primary Key</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p34833129">You can click <strong id="EN-US_TOPIC_0000001234200603__b127796518593546">Delete</strong> to delete UNIQUE from the list.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p34483920">Mandatory parameters are marked with asterisks (*).</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section15250979"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section15250979"></a><a name="en-us_topic_0185264992_section15250979"></a><h4 class="sectiontitle">CHECK</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p41734120">Set the constraint type to <strong id="EN-US_TOPIC_0000001234200603__b137311748793546">CHECK</strong> and enter the constraint name.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p13397545">When the INSERT or UPDATE operation is performed, and if the check expression fails, then table data is not altered.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p36025402">If you double-click column in <strong id="EN-US_TOPIC_0000001234200603__b0304141772717">Available Columns</strong> list, it is inserted to <strong id="EN-US_TOPIC_0000001234200603__b2567161982720">Check Expression</strong> edit line to current cursor position.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p47210194">In the <strong id="EN-US_TOPIC_0000001234200603__b68353122993546">Constraints</strong> area, click <strong id="EN-US_TOPIC_0000001234200603__b12908304693546">Add</strong>. You can click <strong id="EN-US_TOPIC_0000001234200603__b194037716793546">Delete</strong> to delete CHECK from the list. Mandatory parameters are marked with asterisks (*). After defining all constraints, click <strong id="EN-US_TOPIC_0000001234200603__b166951535182715">Next</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p15548183253217">The following table lists the table constraint parameters that can be configured for common tables.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_table1120212131010" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Constraint types</caption><thead align="left"><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row612281271018"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.23.7.2.5.1.1"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p14698112781020">Constraint Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.23.7.2.5.1.2"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p12699927181012"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b1710614945917">Row-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.23.7.2.5.1.3"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p369942741011"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b8298111112591">Column-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.23.7.2.5.1.4"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p4699142751011"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b10462613105917">ORC Table</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row15123141271018"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p7699172711019">CHECK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p73711346104817">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p192101610480">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p194410161487">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row3124312191011"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p0700182731017">UNIQUE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p0409154617484">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p85821674820">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p575161613481">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row51261012141016"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p20701427191014">PRIMARY KEY</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p5422114634810">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1287171617486">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.23.7.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1799131664813">x</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section082554911302"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section082554911302"></a><a name="en-us_topic_0185264992_section082554911302"></a><h4 class="sectiontitle">Defining an Index</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p35342723">Indexes are optional. They are used to enhance database performance. This operation constructs an index on the specified column(s) of the specified table. Select the <strong id="EN-US_TOPIC_0000001234200603__b118154402316">Unique Index</strong> check box to enable this option.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p49649058">Choose the name of the index method from the <strong id="EN-US_TOPIC_0000001234200603__b4824145333111">Access Method</strong> list. The default method is B-tree.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p44188343">The <strong id="EN-US_TOPIC_0000001234200603__b0919173903217">Fill factor</strong> for an index is a percentage that determines how full the index method will try to pack index pages. For B-trees, leaf pages are filled to this percentage during initial index build, and also when extending the index at the right (adding new largest key values). If pages subsequently become completely full, they will be split, leading to gradual degradation in the index's efficiency. B-trees use a default fill factor of 90, but any integer value from 10 to 100 can be selected. If the table is static, then a fill factor of 100 can minimize the index's physical size. For heavily updated tables, an explain plan smaller fill factor is better to minimize the need for page splits. Other indexing methods use different fill factors but work in similar ways. The default fill factor varies between methods.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p62150771">You can either enter a user-defined expression for the index or you can create the index using the <strong id="EN-US_TOPIC_0000001234200603__b17796123218494">Available Columns</strong> list. Select the column in the <strong id="EN-US_TOPIC_0000001234200603__b128843510500">Available Columns</strong> list and click <strong id="EN-US_TOPIC_0000001234200603__b633814845016">Add</strong>. If you need a multi-column index, repeat this step for other columns.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p22486031">After entering the required information for the new index, click <strong id="EN-US_TOPIC_0000001234200603__b18341333115019">Add</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p9429236">You can also delete an index from the list using the <strong id="EN-US_TOPIC_0000001234200603__b933915395010">Delete</strong> button. After defining all indexes, click <strong id="EN-US_TOPIC_0000001234200603__b71531456165012">Next</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p739114337129">You can configure the following parameters of an index in a common table.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_table1034121112613" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row137611152618"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.24.9.2.5.1.1"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p138041234172715"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b11597132019592">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.24.9.2.5.1.2"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p08492348272"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b88801922185917">Row-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.24.9.2.5.1.3"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1989593412272"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b9621425195917">Column-store Table</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.24.9.2.5.1.4"><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1694353419276"><strong id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_b627527155913">ORC Table</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row43891112261"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1835123511276">Unique Indexes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p29218350274">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p142171419310">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p15784351483">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row19393117267"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p25451635132714">btree</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p536516523487">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p53810529487">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1580275134814">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1040011132617"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p580515359274">gin</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p3397175217486">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p3412195219487">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1881510510485">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1341811202619"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p115583692718">gist</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1942510521487">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p94381352164813">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p68301556488">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row18421811132618"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p532733613277">hash</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p4452852134818">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p16468165244810">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1884519574817">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1444141152613"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p2560203662716">psort</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p048418528488">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1349705216481">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1185985144815">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1451711192614"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p684010363274">spgist</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p75121852104814">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p135251852134810">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p158761512488">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row1675919452265"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p23331737182712">Fill Factor</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p112561855174815">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p155132213481">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p95507224813">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row697264812612"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p106148379272">User Defined Expression</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p102691755164813">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p115631225481">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1157782194810">x</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_row29735213263"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.1 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p1847138142720">Partial Index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.2 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p8282195519485">√</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.3 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p13594172124814">x</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.24.9.2.5.1.4 "><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p560912284813">x</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section7772325171112"><a name="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_section7772325171112"></a><a name="en-us_topic_0185264992_section7772325171112"></a><h4 class="sectiontitle">SQL Preview</h4><p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p17177639">Data Studio generates a DDL statement based on the inputs provided in <strong id="EN-US_TOPIC_0000001234200603__b654617345218">Create New table</strong> wizard.</p>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p20381027">You can only view, select, and copy the query. You cannot edit the query.</p>
|
|
<ul id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_ul49211517"><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li9266704">To select all queries, press <strong id="EN-US_TOPIC_0000001234200603__b16359258145217">Ctrl+A</strong> or right-click and select <strong id="EN-US_TOPIC_0000001234200603__b1246018010538">Select All</strong>.</li><li id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_li44541364">To copy the selected query, press <strong id="EN-US_TOPIC_0000001234200603__b1666217108539">Ctrl+C</strong> or right-click and select <strong id="EN-US_TOPIC_0000001234200603__b2816141325317">Copy</strong>.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001234200603__en-us_topic_0185264992_p26709911">Click <strong id="EN-US_TOPIC_0000001234200603__b9609729165315">Finish</strong> to create the table. On clicking the <strong id="EN-US_TOPIC_0000001234200603__b340085985313">Finish</strong> button, the generated query will be sent to the server. Any errors are displayed in the dialog box and status bar.</p>
|
|
</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>
|
|
|