Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 1.55 KB

devenv-clustered-property.md

File metadata and controls

64 lines (48 loc) · 1.55 KB
title description ms.author ms.date ms.topic author ms.reviewer
Clustered Property
Sets a value that indicates whether the key also defines the clustered index in the database.
solsen
05/14/2024
reference
SusanneWindfeldPedersen
solsen

Clustered Property

Version: Available or changed with runtime version 1.0.

Sets a value that indicates whether the key also defines the clustered index in the database.

By default the primary key is configured as the clustered key.

Applies to

  • Table Key

Note

The Clustered property cannot be used in table extension objects.

Property value

True if the index is clustered, otherwise false. The default is false.

Syntax

Clustered = true;

Remarks

A clustered index determines the physical order in which records are stored in the table. Using a clustered key can improve the time it takes to retrieve records.

There can be only one clustered key on a table.

Example

The following example defines a secondary key to be a clustered index.

keys
{
    // the first key defined in the keys section is the primary key
    key(PrimaryKey; ID)
    {
        Clustered = false;
    }
    key(CustomerInfo; Name,Address,City)
    {
        Clustered = true;
    }
}

See Also

Table Key