how do i name a relationship in the syntaxt
I know how to name it like:
I don't like the default names MSSQL assigns when i use the first syntaxt.
CHEERS!
Randall Vollen
Merrill Lynch
Code:
CREATE TABLE ReportPeriod_ReportDate (
ReportPeriodID INTEGER NOT NULL,
ReportDateID INTEGER NOT NULL,
PRIMARY KEY(ReportPeriodID, ReportDateID),
FOREIGN KEY(ReportPeriodID)
REFERENCES ReportPeriod(ReportPeriodID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
FOREIGN KEY(ReportDateID)
REFERENCES ReportDate(ReportDateID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);
I know how to name it like:
Code:
ALTER TABLE [dbo].[Department] ADD
CONSTRAINT [FK_DepartmentHead] FOREIGN KEY
(
[DepartmentHeadUniqueID]
) REFERENCES [dbo].[Employee] (
[EmployeeUniqueID]
)
I don't like the default names MSSQL assigns when i use the first syntaxt.
CHEERS!
Randall Vollen
Merrill Lynch