On Friday 30 November 2001 09:15, Peter Levart wrote: > In Sybase you can leave out the "CONSTRAINT constraint_name" part of the > statement. As far as uniqueness is concerned the following two statements > work together: > > CREATE TABLE t1 (i INTEGER, CONSTRAINT c PRIMARY KEY (i)) > > CREATE TABLE t2 (i INTEGER, CONSTRAINT c PRIMARY KEY (i)) > > Even the following two work together just fine: > > CREATE TABLE t1 (i INTEGER, CONSTRAINT c PRIMARY KEY (i)) > > CREATE TABLE t2 (i1 INTEGER, i2 INTEGER, > CONSTRAINT c PRIMARY KEY (i1), > CONSTRAINT c FOREIGN KEY (i2) REFERENCES t1 (i)) > > So the constraint_name is basically just a comment in Sybase... >
OK, there is one thing you can do with constraint names. You can bind custom error messages to them and a key to select an error message is a constraint name, so it is advisable that constraint names are unique within a database. Peter _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
