Editing a Unique Constraint

Edit a unique constraint to change a uniqueness requirement on specified non-null column values.

Prerequisites 

Before you can edit a unique constraint, be sure the data server on which you are editing a unique constraint is running, and you created and established a connection to the data server. Open the table in the Table Schema Editor.

  1. In the Table Schema Editor, select the Constraints tab for the table for which you want to edit the unique constraint.
  2. Expand the Unique Constraints folder under Constraints in the directory tree, and highlight the unique constraint to edit.
  3. Edit the unique constraint settings in the Details pane.
    Field Description
    Name Enter a name for the unique constraint in the text field.
    Filter Column by Name Pattern (Optional) Enter a filter expression for columns to be displayed in the list of available columns. For example, * lists all columns for the specified table.
    Available Columns Columns available for defining a unique constraint. You can sort the list of columns by clicking on Column Name above the list. Move a column from the Available Columns list to the Selected Columns list in one of three ways:
    • Double-click the column in the Available columns list, which specifies that the unique constraint is created in ascending order for this column.
    • Highlight the column, and click ASC>>, which specifies that the unique constraint is created in ascending order for this column.
    • Highlight the column, and click DESC>>, which specifies that the unique constraint is created in descending order for this column.
    Selected Columns Columns selected as defining the unique constraint. You can sort the list of columns by clicking on Column Name above the list. You can also reorder a list item by highlighting the column in the list and clicking Up or Down. To place a column back in the Available Columns list, highlight the column and click <<Remove.
    Fill Factor Choose the fill factor setting, which specifies how full the data server makes each page when it creates a new unique constraint on existing data. The default is 0.
    Maximum Rows Per Page Specify the maximum number of rows on data pages and the leaf-level pages of indexes. The default is 0.
    Reserve Page Gap Specify the ratio of filled pages to empty pages to be left during I/O allocation operations. For each specified number of pages, an empty page is left for future expansion of the index. Valid values are 0 - 255. The default is 0.
    Create on Segment Specify whether to create the unique constraint on a default or system segment.
  4. Select File > Save from the main menu.
  5. (Optional) Execute the changes or save the DDL to a SQL file.
    Option Description
    To execute the changes Click Save.
    To save the DDL to a SQL file Click Save As, enter or select a project or project folder, and specify a file name for the DDL.
Related concepts
Unique Constraints
Related tasks
Creating a Unique Constraint
Dropping a Unique Constraint


Created June 25, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com