Choose your database:
MS SQL Server
SQL Anywhere

Subscribe to our news:
Paul Slicky: "I just want to say this has been the fastest, greatest, and most coopertive tool I have ever had. It turned out to be easy to use and very slick. Keep up the good work".
Dan Flazer: "Your new product and your assistance with us was excellent...will prove invaluable to the future of our company".


Add your opinion

MaxDB Maestro online Help

Prev Return to chapter overview Next

Foreign Keys

A foreign key constraint specifies that the values in a column (or a group of columns) must match the values appearing in some row of another table. They are said to maintain the referential integrity between two related tables.

Note: To create a foreign key constraint, it is necessary to have this privilege for both the referencing and referenced tables.


Foreign Key Editor allows you to select fields for the foreign key when you add or edit a foreign key to the table using Table Editor.


Set the Foreign Key Name, select Columns from the Available Fields list to include into the foreign key, select the Foreign Table Name from the drop-down list and its fields from the list to include, set other foreign key properties and apply the changes by clicking the OK button. All the fields which are included into the Foreign Key must be included into indexes as well. See Indexes for details.

See also: Table Editor, Index Editor.

Note: the name of the object must be unique among all the object names in its container. Moreover, all the objects that are source of data need unique names among themselves. You can use any identifier that is allowed by MaxDB server.



You can find answers on the commonest question about working with indexes here:

Prev Return to chapter overview Next