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

SQL Anywhere 11.0.1 (Français) » UltraLiteJ » UltraLiteJ Reference » UltraLiteJ API reference » Connection interface


createForeignKey method

Creates a new foreign key.

ForeignKeySchema Connection.createForeignKey(
  String table_name,
  String primary_table_name,
  String name
) throws ULjException
  • table_name   The name of table to contain a foreign key. This is the table constrained to have a valid reference to the primary table.

  • primary_table_name   The name of table containing referenced columns.

  • name   The name of the foreign key. The specified name must be a valid SQL identifier.


UltraLiteJ does not enforce foreign key constraints on tables. Foreign keys are used to determine the correct order in which tables should be synchronized. Foreign keys on the client database should match the relations on the consolidated database that the client synchronizes to.


The ForeignKey with the name and table involvement defined.