my second thread of the day...
hey guys,
I was wondering if someone could help me. I am new to SQL Server therefore new to T-SQL, I have worked with SQL before. I am trying to reference foreign keys when creating tables. The code I have in SQL is :-
CREATE TABLE BCust (
BCustID INT IDENTITY NULL, BrokerID INT NULL,
CompanyName VARCHAR NULL,
ContactName VARCHAR NULL,
Address VARCHAR (50) NULL,
Address2 VARCHAR (50) NULL,
EmailAddress VARCHAR (30) NULL,
Telephone VARCHAR (20) NULL,
FaxNumber VARCHAR (20) NULL,
ExtraInfo TEXT NULL,
PRIMARY KEY (BCustID)
CONSTRAINT BrokerID FOREIGN KEY (BrokerID)
REFERENCE Broker (BrokerID)
ON DELETE CASCADE ON UPDATE CASCADE
);
How would I change this code for the reference part for T-SQL?
Thanks!
GLT