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.

    The Details pane displays information about the unique constraint.

  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 Optionally enter a filter expression for columns to be displayed in the list of available columns. For example, * will list all columns for the specified table.
    Available columns This is a list of 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. This specifies that the unique constraint is created in ascending order for this column.
    • Highlight the column, and click ASC>>. This also specifies that the unique constraint is created in ascending order for this column.
    • Highlight the column, and click DESC>>. This specifies that the unique constraint is created in descending order for this column.
    Selected columns This is a list of 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 deault 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 in WorkSpace to save your settings to the unique constraint.

    A Preview Changes dialog may appear with the DDL for altering the unique constraint.

  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

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.