New Index

The New Index dialog box in Server Explorer in Visual Studio lets you create a new index on a SQL Server Compact database.

Options

Table name

Displays the name of the table that the index will be created on.

Index name

Specify the name of the index that you want to create.

Unique

Selecting this check box makes the index unique. No two rows are permitted to have the same index value. By default, this option is cleared.

Index Key Columns Name

Displays the name of the column that participates in the index key.

Sort Order

Specify the sort direction of the selected index column, either Ascending or Descending.

Data Type

Displays the data type information. If the table column is a computed column, Data type displays "computed column."

Size

Displays the maximum number of bytes required to store the column data type.

Identity

Displays whether the column participating in the index key is an identity column.

Allow Nulls

Displays whether the column participating in the index key allows NULL values to be stored in the table or view column.

Add

Add a column to the index key. Select table columns from the Select Columns dialog box that appears when you click Add.

Remove

Remove the selected column from participation in the index key.

Move Up

Move the selected column up in the index key grid. For more information about column order in an index, see Query Performance Tuning (SQL Server Compact).

Move Down

Move the selected column down in the index key grid.