Primary Keys Editor (SQL Server)

From RapidSQL
Jump to: navigation, search

Go Up to Microsoft SQL Server Object Editors

The Primary Keys Editor lets you manage the columns and basic properties for a primary key and lets you view page and row statistics.

To edit a primary key

  1. Open an editor on the primary key. For details, see Opening an Object Editor.
  2. Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:
Tab Settings and tasks

Columns

Lets you manage columns that make up the primary key. On opening, this tab shows the existing columns. For each column, the listing shows the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column. Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the primary key.

Select a column and click the Drop button to delete the column from the primary key.

Select a column and use the arrow buttons to reorder the columns in the primary key.

Properties

Lets you work with settings in the following categories:

Creation

In addition to displaying identifying information, you can modify the Build Online and Max degree of parallelism properties. For details on these properties, see Primary Keys Wizard (SQL Server).

Attributes

Clustered - Indicates whether the target primary key is clustered. Ignore Duplicate Key - Indicates whether the target primary key ignores duplicate key values. If you select his option, the transaction that generated the duplicate key values can continue. Statistics Recompute - Indicates that index statistics are automatically recomputed as the index is updated. Microsoft does not recommend this.

Storage

File Group - Lets you select a file group. Fill Factor - Lets you specify the fill factor that specifies how full each index page can be. If no fill factor is specified, Microsoft SQL Server uses the database's default fill factor. Pad Index - If you specified a Fill factor of more than 0 percent, and you selected the option to create a unique index, you can specify to use the same percentage you specified in Fill Factor as the space to leave open on each interior node. By default, Microsoft SQL Server sets a 2 row index size.

Statistics

Lets you view statistics in the following categories:

Page Statistics

Data Pages, Reserved Pages, Used Pages, and Total Pages Modified.

Row Statistics

Maximum Row Size, Minimum Row Size, Max Size of Non-Leaf Index Row, and Total Rows Modified.

DDL View

For details on using this tab, see Viewing the SQL/DDL for an Object.

3. When finished, you can submit your changes. For details, see Previewing and Submitting Object Editor Changes.
Personal tools