Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 » SQL Anywhere Server - SQL Usage » Working with database objects » Managing foreign keys


Manage foreign keys (SQL)

A table can only have one primary key defined, but it can have many foreign keys. You can create and alter foreign keys in Interactive SQL using the CREATE TABLE and ALTER TABLE statements. These statements let you set many table attributes, including column constraints and checks.

 To create a foreign key (SQL)
  1. Connect to the database as a user with DBA authority.

  2. Execute an ALTER TABLE statement.

 Omitting column names at foreign key creation (SQL)
 See also