Is there any material difference between these two ways of defining foreign key constraints?
CREATE TABLE table1 ( id INT PRIMARY KEY, other_id INT REFERENCES table2(id) ) CREATE TABLE table1 ( id INT, other_id INT, CONSTRAINT pk_table1 PRIMARY KEY (id), CONSTRAINT fk_table1_other_id FOREIGN KEY (other_id) REFERENCES table2(id) )
Obviously one is more verbose. I've also read that the explicit constraint names might be useful within application code during exception handling.
Is one preferred over the other?