Tables [dbo].[PlasticInstrument]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created4:09:40 PM Thursday, December 6, 2018
Last Modified7:36:13 PM Thursday, August 29, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_PlasticInstrument: InstrumentIDInstrumentIDint4
No
1 - 1
Foreign Keys FK_PlasticInstrument_PlasticProviderFID: [dbo].[PlasticProvider].ProviderFIDProviderFIDint4
No
HolderNamevarchar(1000)1000
Yes
BillingAddressvarchar(1000)1000
Yes
BillingCityvarchar(1000)1000
Yes
BillingStatevarchar(255)255
Yes
BillingPostalCodevarchar(255)255
Yes
Tokenvarchar(1000)1000
No
Accessoryvarchar(1000)1000
No
LastFourvarchar(4)4
No
Foreign Keys FK_PlasticInstrument_PlasticTokenTypeFID: [dbo].[PlasticTokenType].TokenTypeFIDTokenTypeFIDint4
No
Indexes IX_PlasticInstrument_CustomerNumber: CustomerNumberCustomerNumbervarchar(15)15
Yes
Foreign Keys FK_PlasticInstrument_OrderFID: [dbo].[Orders].OrderFIDIndexes IX_PlasticInstrument_OrderFID: OrderFIDOrderFIDint4
Yes
Inactivebit1
No
((0))
FirstUsedDatedatetime8
No
(getutcdate())
LastUsedDatedatetime8
No
(getutcdate())
NickNamevarchar(40)40
Yes
OnlineOkForFutureInvbit1
No
((0))
OnlineOkDatedatetime8
Yes
HolderLastNamevarchar(500)500
Yes
BillingCountryvarchar(255)255
Yes
GatewayCustomerIDvarchar(40)40
Yes
BillingAddress2varchar(1000)1000
Yes
ExpirationDatedatetime8
Yes
ConversionFIDint4
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_PlasticInstrument: InstrumentIDPK_PlasticInstrumentInstrumentID
Yes
IX_PlasticInstrument_CustomerNumberCustomerNumber
IX_PlasticInstrument_OrderFIDOrderFID
Foreign Keys Foreign Keys
NameColumns
FK_PlasticInstrument_OrderFIDOrderFID->[dbo].[Orders].[PriKey]
FK_PlasticInstrument_PlasticProviderFIDProviderFID->[dbo].[PlasticProvider].[ProviderID]
FK_PlasticInstrument_PlasticTokenTypeFIDTokenTypeFID->[dbo].[PlasticTokenType].[TokenTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[PlasticInstrument]
(
[InstrumentID] [int] NOT NULL IDENTITY(1, 1),
[ProviderFID] [int] NOT NULL,
[HolderName] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingAddress] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingCity] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingState] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingPostalCode] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Token] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Accessory] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[LastFour] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TokenTypeFID] [int] NOT NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrderFID] [int] NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_PlasticInstrument_Inactive] DEFAULT ((0)),
[FirstUsedDate] [datetime] NOT NULL CONSTRAINT [DF_PlasticInstrument_FirstUsedDate] DEFAULT (getutcdate()),
[LastUsedDate] [datetime] NOT NULL CONSTRAINT [DF_PlasticInstrument_LastUsedDate] DEFAULT (getutcdate()),
[NickName] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OnlineOkForFutureInv] [bit] NOT NULL CONSTRAINT [DF_PlasticInstrument_OnlineOkForFutureInv] DEFAULT ((0)),
[OnlineOkDate] [datetime] NULL,
[HolderLastName] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingCountry] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GatewayCustomerID] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingAddress2] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ExpirationDate] [datetime] NULL,
[ConversionFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticInstrument] ADD CONSTRAINT [PK_PlasticInstrument] PRIMARY KEY CLUSTERED  ([InstrumentID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PlasticInstrument_CustomerNumber] ON [dbo].[PlasticInstrument] ([CustomerNumber]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PlasticInstrument_OrderFID] ON [dbo].[PlasticInstrument] ([OrderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticInstrument] ADD CONSTRAINT [FK_PlasticInstrument_OrderFID] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[PlasticInstrument] ADD CONSTRAINT [FK_PlasticInstrument_PlasticProviderFID] FOREIGN KEY ([ProviderFID]) REFERENCES [dbo].[PlasticProvider] ([ProviderID])
GO
ALTER TABLE [dbo].[PlasticInstrument] ADD CONSTRAINT [FK_PlasticInstrument_PlasticTokenTypeFID] FOREIGN KEY ([TokenTypeFID]) REFERENCES [dbo].[PlasticTokenType] ([TokenTypeID])
GO
GRANT SELECT ON  [dbo].[PlasticInstrument] TO [MssExec]
GRANT INSERT ON  [dbo].[PlasticInstrument] TO [MssExec]
GRANT DELETE ON  [dbo].[PlasticInstrument] TO [MssExec]
GRANT UPDATE ON  [dbo].[PlasticInstrument] TO [MssExec]
GO
Uses
Used By