Tables [dbo].[BuildingConstraintItemMap]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created9:20:45 AM Friday, December 7, 2018
Last Modified9:20:46 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_BuildingConstraintItemMap: BuildingConstraintItemMapIDBuildingConstraintItemMapIDint4
No
1 - 1
Foreign Keys FK_BuildingConstraintItemMap_OrderLocation: [dbo].[Buildings].BuildingFIDIndexes IX_BuildingConstraintItemMap_BuildingsBuildingConstraintItemFID: BuildingFID\BuildingConstraintItemFIDBuildingFIDint4
No
Foreign Keys FK_BuildingConstraintItemMap_Order: [dbo].[BuildingConstraintItems].BuildingConstraintItemFIDIndexes IX_BuildingConstraintItemMap_BuildingsBuildingConstraintItemFID: BuildingFID\BuildingConstraintItemFIDBuildingConstraintItemFIDint4
No
ConstraintFlagbit1
No
((0))
YesNoFlagbit1
No
((0))
Notevarchar(64)64
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_BuildingConstraintItemMap: BuildingConstraintItemMapIDPK_BuildingConstraintItemMapBuildingConstraintItemMapID
Yes
IX_BuildingConstraintItemMap_BuildingsBuildingConstraintItemFIDBuildingFID, BuildingConstraintItemFID
Foreign Keys Foreign Keys
NameColumns
FK_BuildingConstraintItemMap_OrderBuildingConstraintItemFID->[dbo].[BuildingConstraintItems].[BuildingConstraintItemID]
FK_BuildingConstraintItemMap_OrderLocationBuildingFID->[dbo].[Buildings].[BuildingID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BuildingConstraintItemMap]
(
[BuildingConstraintItemMapID] [int] NOT NULL IDENTITY(1, 1),
[BuildingFID] [int] NOT NULL,
[BuildingConstraintItemFID] [int] NOT NULL,
[ConstraintFlag] [bit] NOT NULL CONSTRAINT [DF_BuildingConstraint_ContraintFlag] DEFAULT ((0)),
[YesNoFlag] [bit] NOT NULL CONSTRAINT [DF_BuildingConstraintItemMap_AllowCheckbox] DEFAULT ((0)),
[Note] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BuildingConstraintItemMap] ADD CONSTRAINT [PK_BuildingConstraintItemMap] PRIMARY KEY CLUSTERED  ([BuildingConstraintItemMapID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BuildingConstraintItemMap_BuildingsBuildingConstraintItemFID] ON [dbo].[BuildingConstraintItemMap] ([BuildingFID], [BuildingConstraintItemFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BuildingConstraintItemMap] ADD CONSTRAINT [FK_BuildingConstraintItemMap_Order] FOREIGN KEY ([BuildingConstraintItemFID]) REFERENCES [dbo].[BuildingConstraintItems] ([BuildingConstraintItemID])
GO
ALTER TABLE [dbo].[BuildingConstraintItemMap] ADD CONSTRAINT [FK_BuildingConstraintItemMap_OrderLocation] FOREIGN KEY ([BuildingFID]) REFERENCES [dbo].[Buildings] ([BuildingID])
GO
GRANT SELECT ON  [dbo].[BuildingConstraintItemMap] TO [MssExec]
GRANT INSERT ON  [dbo].[BuildingConstraintItemMap] TO [MssExec]
GRANT DELETE ON  [dbo].[BuildingConstraintItemMap] TO [MssExec]
GRANT UPDATE ON  [dbo].[BuildingConstraintItemMap] TO [MssExec]
GO
Uses