Tables [dbo].[XmlOrderAddressMap]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created10:03:28 AM Friday, December 7, 2018
Last Modified10:03:47 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_XmlOrderAddressMap: XmlOrderAddressMapIDXmlOrderAddressMapIDint4
No
1 - 1
Foreign Keys FK_XmlOrderAddressMap_Orders: [dbo].[Orders].OrderFIDIndexes IX_XmlOrderAddressMap_Orders_XmlSystem_ExternalStopNumber: OrderFID\ExternalAddressNumber\XmlSystemFIDOrderFIDint4
No
Foreign Keys FK_XmlOrderAddressMap_OrderAddress: [dbo].[OrderAddress].OrderAddressFIDIndexes IX_XmlOrderAddressMap_OrderAddress_XmlSystem: OrderAddressFID\XmlSystemFIDOrderAddressFIDint4
No
Foreign Keys FK_XmlOrderAddressMap_XmlSystem: [dbo].[XmlSystem].XmlSystemFIDIndexes IX_XmlOrderAddressMap_OrderAddress_XmlSystem: OrderAddressFID\XmlSystemFIDIndexes IX_XmlOrderAddressMap_Orders_XmlSystem_ExternalStopNumber: OrderFID\ExternalAddressNumber\XmlSystemFIDXmlSystemFIDint4
No
Indexes IX_XmlOrderAddressMap_Orders_XmlSystem_ExternalStopNumber: OrderFID\ExternalAddressNumber\XmlSystemFIDExternalAddressNumbervarchar(16)16
No
ExternalTripNumbervarchar(16)16
Yes
ExternalMoveNumbervarchar(16)16
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_XmlOrderAddressMap: XmlOrderAddressMapIDPK_XmlOrderAddressMapXmlOrderAddressMapID
Yes
IX_XmlOrderAddressMap_OrderAddress_XmlSystemOrderAddressFID, XmlSystemFID
Yes
IX_XmlOrderAddressMap_Orders_XmlSystem_ExternalStopNumberOrderFID, ExternalAddressNumber, XmlSystemFID
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_XmlOrderAddressMap_OrderAddressCascadeOrderAddressFID->[dbo].[OrderAddress].[OrderAddressID]
FK_XmlOrderAddressMap_OrdersOrderFID->[dbo].[Orders].[PriKey]
FK_XmlOrderAddressMap_XmlSystemXmlSystemFID->[dbo].[XmlSystem].[XmlSystemID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[XmlOrderAddressMap]
(
[XmlOrderAddressMapID] [int] NOT NULL IDENTITY(1, 1),
[OrderFID] [int] NOT NULL,
[OrderAddressFID] [int] NOT NULL,
[XmlSystemFID] [int] NOT NULL,
[ExternalAddressNumber] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ExternalTripNumber] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ExternalMoveNumber] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlOrderAddressMap] ADD CONSTRAINT [PK_XmlOrderAddressMap] PRIMARY KEY CLUSTERED  ([XmlOrderAddressMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlOrderAddressMap] ADD CONSTRAINT [IX_XmlOrderAddressMap_OrderAddress_XmlSystem] UNIQUE NONCLUSTERED  ([OrderAddressFID], [XmlSystemFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlOrderAddressMap] ADD CONSTRAINT [IX_XmlOrderAddressMap_Orders_XmlSystem_ExternalStopNumber] UNIQUE NONCLUSTERED  ([OrderFID], [ExternalAddressNumber], [XmlSystemFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlOrderAddressMap] ADD CONSTRAINT [FK_XmlOrderAddressMap_OrderAddress] FOREIGN KEY ([OrderAddressFID]) REFERENCES [dbo].[OrderAddress] ([OrderAddressID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[XmlOrderAddressMap] ADD CONSTRAINT [FK_XmlOrderAddressMap_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[XmlOrderAddressMap] ADD CONSTRAINT [FK_XmlOrderAddressMap_XmlSystem] FOREIGN KEY ([XmlSystemFID]) REFERENCES [dbo].[XmlSystem] ([XmlSystemID])
GO
GRANT SELECT ON  [dbo].[XmlOrderAddressMap] TO [MssExec]
GRANT INSERT ON  [dbo].[XmlOrderAddressMap] TO [MssExec]
GRANT DELETE ON  [dbo].[XmlOrderAddressMap] TO [MssExec]
GRANT UPDATE ON  [dbo].[XmlOrderAddressMap] TO [MssExec]
GO
Uses