Please enable JavaScript to view this site.

Altova DatabaseSpy 2021 Enterprise Edition

A primary key may include multiple columns, in which case it is known as a "composite" primary key.

To create a composite primary key:

1.In the Online Browser, right-click the first column and select Create Primary Key from the context menu.

2.Right-click another column and select Add Column to Primary Key from the context menu. If necessary, repeat this step for each column that needs to be added to the primary key.

3.Click the Execute Change Script dbs_ic_execute_script button in the Database Structure Change Script window.

To remove a column from a composite primary key:

1.In the Online Browser, expand the primary key dbs_ic_primary_key in the "Keys" folder of a table.

2.Right-click the column that is to be removed from the primary key, and select Remove Column from Key from the context menu.

3.Click the Execute Change Script dbs_ic_execute_script button in the Database Structure Change Script window.

© 2020 Altova GmbH