Tables [dbo].[GLAccounts]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:56:13 AM Thursday, March 21, 2019
Last Modified1:16:15 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_GLAccounts: AccountIDAccountIDint4
False
AccountNumbervarchar(20)20
False
AccountNamevarchar(50)50
False
Foreign Keys FK_GLAccounts_AccountTypeID_GLAccountTypes: [dbo].[GLAccountTypes].AccountTypeIDAccountTypeIDint4
False
Balancemoney8
False
((0))
Remarksvarchar(255)255
False
Activebit1
False
Locksint4
False
((0))
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
Foreign Keys FK_GLAccounts_AcctProtectionTypeID_GLAcctProtectionTypes: [dbo].[GLAcctProtectionTypes].AcctProtectionTypeIDAcctProtectionTypeIDint4
True
Foreign Keys FK_GLAccounts_NoteID_GLAccountNotes: [dbo].[GLAccountNotes].NoteIDNoteIDint4
True
NoteFlagint4
False
((0))
NoteCountint4
False
((0))
Foreign Keys FK_GLAccounts_ShTrackingConfigID_ShTrackingConfigs: [dbo].[ShTrackingConfigs].ShTrackingConfigIDShTrackingConfigIDint4
True
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_GLAccounts: AccountIDPK_GLAccountsAccountID
True
80
NameColumns
FK_GLAccounts_AccountTypeID_GLAccountTypesAccountTypeID->[dbo].[GLAccountTypes].[AccountTypeID]
FK_GLAccounts_AcctProtectionTypeID_GLAcctProtectionTypesAcctProtectionTypeID->[dbo].[GLAcctProtectionTypes].[AcctProtectionTypeID]
FK_GLAccounts_NoteID_GLAccountNotesNoteID->[dbo].[GLAccountNotes].[NoteID]
FK_GLAccounts_ShTrackingConfigID_ShTrackingConfigsShTrackingConfigID->[dbo].[ShTrackingConfigs].[ShTrackingConfigID]
CREATE TABLE [dbo].[GLAccounts]
(
[AccountID] [int] NOT NULL,
[AccountNumber] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AccountName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AccountTypeID] [int] NOT NULL,
[Balance] [money] NOT NULL CONSTRAINT [DF_GLAccounts_Balance] DEFAULT ((0)),
[Remarks] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Active] [bit] NOT NULL,
[Locks] [int] NOT NULL CONSTRAINT [DF_GLAccounts_Locks] DEFAULT ((0)),
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_GLAccounts_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_GLAccounts_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[AcctProtectionTypeID] [int] NULL,
[NoteID] [int] NULL,
[NoteFlag] [int] NOT NULL CONSTRAINT [DF_GLAccounts_NoteFlag] DEFAULT ((0)),
[NoteCount] [int] NOT NULL CONSTRAINT [DF_GLAccounts_NoteCount] DEFAULT ((0)),
[ShTrackingConfigID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[GLAccounts] ADD CONSTRAINT [PK_GLAccounts] PRIMARY KEY CLUSTERED  ([AccountID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[GLAccounts] ADD CONSTRAINT [FK_GLAccounts_AccountTypeID_GLAccountTypes] FOREIGN KEY ([AccountTypeID]) REFERENCES [dbo].[GLAccountTypes] ([AccountTypeID])
GO
ALTER TABLE [dbo].[GLAccounts] ADD CONSTRAINT [FK_GLAccounts_AcctProtectionTypeID_GLAcctProtectionTypes] FOREIGN KEY ([AcctProtectionTypeID]) REFERENCES [dbo].[GLAcctProtectionTypes] ([AcctProtectionTypeID])
GO
ALTER TABLE [dbo].[GLAccounts] ADD CONSTRAINT [FK_GLAccounts_NoteID_GLAccountNotes] FOREIGN KEY ([NoteID]) REFERENCES [dbo].[GLAccountNotes] ([NoteID])
GO
ALTER TABLE [dbo].[GLAccounts] ADD CONSTRAINT [FK_GLAccounts_ShTrackingConfigID_ShTrackingConfigs] FOREIGN KEY ([ShTrackingConfigID]) REFERENCES [dbo].[ShTrackingConfigs] ([ShTrackingConfigID])
GO