I have a question on the "Test" keyword. Example where Test is used:
CREATE TABLE BOOKS
(ISBN TEXT(13) CONSTRAINT PrimaryKeyName PRIMARY KEY,
TITLE TEXT(100),
PRICE MONEY,
PubID TEXT(10) CONSTRAINT Test FOREIGN KEY(PubID) REFERENCES
PUBLISHERS
(PubID));
Whats the reason for "CONSTRAINT Test"? When using PubID again as a foreign key in another table I got an error saying "There is already a relationship named 'Test' in the current database." Two questions: Is there no way to use the Test keyword in another table and whats another way to declare a foreign key in SQL code? Thanks.
CREATE TABLE BOOKS
(ISBN TEXT(13) CONSTRAINT PrimaryKeyName PRIMARY KEY,
TITLE TEXT(100),
PRICE MONEY,
PubID TEXT(10) CONSTRAINT Test FOREIGN KEY(PubID) REFERENCES
PUBLISHERS
(PubID));
Whats the reason for "CONSTRAINT Test"? When using PubID again as a foreign key in another table I got an error saying "There is already a relationship named 'Test' in the current database." Two questions: Is there no way to use the Test keyword in another table and whats another way to declare a foreign key in SQL code? Thanks.