Subject Re: [firebird-support] Foreign constraints
Author Martijn Tonies
Hi Tim,

> OK, so I'm impressed. :-) Now, is there any way of naming foreign key
> constraints when you create them? It says so in the documentation, (under
> column constraints) but I can't figure it out. It makes it easier for the
> user to have some message that would reflect, say, the column name and
> table name rather than "INTEG_13" and the table name.

In my previously posted example:

ALTER TABLE ADRES ADD CONSTRAINT FK_ADRES_LAND
FOREIGN KEY (LANDCODE) REFERENCES LAND
(LANDCODE)
ON DELETE NO ACTION
ON UPDATE CASCADE

The constraint is named "FK_ADRES_LAND"

Many tools ( like Database Workbench ) do this automatically for you.

With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com