dbo.Stations_Roads.sql 471 B

123456789
  1. CREATE TABLE [dbo].[Stations_Roads] (
  2. [stationID] INT NOT NULL,
  3. [roadID] INT NOT NULL,
  4. CONSTRAINT [PKcomp_Stations_Roads] PRIMARY KEY CLUSTERED ([stationID] ASC, [roadID] ASC),
  5. CONSTRAINT [FK2_Stations_Roads] FOREIGN KEY ([roadID]) REFERENCES [dbo].[Roads] ([roadID]) ON DELETE CASCADE ON UPDATE CASCADE,
  6. CONSTRAINT [FK1_Stations_Roads] FOREIGN KEY ([stationID]) REFERENCES [dbo].[Stations] ([stationID]) ON DELETE CASCADE ON UPDATE CASCADE
  7. );