Tables [dbo].[Forum_Posts]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count3
Created2:07:30 PM Saturday, November 06, 2010
Last Modified2:07:33 PM Saturday, November 06, 2010
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_Forum_Posts: PostIDIndexes IX_Forum_Posts: PostIDPostIDint4
No
1 - 1
ParentPostIDint4
No
UserIDint4
No
RemoteAddrnvarchar(100)200
Yes
Subjectnvarchar(255)510
No
Bodynvarchar(max)max
No
CreatedDatedatetime8
Yes
Foreign Keys FK_Forum_Posts_Forum_Threads: [dbo].[Forum_Threads].ThreadIDIndexes dbo.Forum_PostsThreadID: ThreadIDThreadIDint4
Yes
UpdatedDatedatetime8
Yes
UpdatedByUserint4
Yes
IsApprovedbit1
Yes
((1))
IsLockedbit1
Yes
((0))
IsClosedbit1
Yes
((0))
DateApproveddatetime8
Yes
PostReportedint4
No
Addressedint4
No
((0))
ParseInfoint4
No
((0))
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_Forum_Posts: PostIDPK_Forum_PostsPostID
Yes
IX_Forum_PostsPostID
Yes
dbo.Forum_PostsThreadIDThreadID
Foreign Keys Foreign Keys
NameNo CheckReplicationDeleteColumns
FK_Forum_Posts_Forum_Threads
Yes
No
CascadeThreadID->[dbo].[Forum_Threads].[ThreadID]
SQL Script
CREATE TABLE [dbo].[Forum_Posts]
(
[PostID] [int] NOT NULL IDENTITY(1, 1),
[ParentPostID] [int] NOT NULL,
[UserID] [int] NOT NULL,
[RemoteAddr] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Subject] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Body] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreatedDate] [datetime] NULL,
[ThreadID] [int] NULL,
[UpdatedDate] [datetime] NULL,
[UpdatedByUser] [int] NULL,
[IsApproved] [bit] NULL CONSTRAINT [DF_Forum_Posts_IsApproved] DEFAULT ((1)),
[IsLocked] [bit] NULL CONSTRAINT [DF_Forum_Posts_IsLocked] DEFAULT ((0)),
[IsClosed] [bit] NULL CONSTRAINT [DF_Forum_Posts_IsClosed] DEFAULT ((0)),
[DateApproved] [datetime] NULL,
[PostReported] [int] NOT NULL,
[Addressed] [int] NOT NULL CONSTRAINT [DF_Forum_Posts_Addressed] DEFAULT ((0)),
[ParseInfo] [int] NOT NULL CONSTRAINT [DF_Forum_Posts_ParseInfo] DEFAULT ((0))
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
ALTER TABLE [dbo].[Forum_Posts] ADD CONSTRAINT [PK_Forum_Posts] PRIMARY KEY CLUSTERED ([PostID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Forum_Posts] ADD CONSTRAINT [IX_Forum_Posts] UNIQUE NONCLUSTERED ([PostID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [dbo.Forum_PostsThreadID] ON [dbo].[Forum_Posts] ([ThreadID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Forum_Posts] WITH NOCHECK ADD CONSTRAINT [FK_Forum_Posts_Forum_Threads] FOREIGN KEY ([ThreadID]) REFERENCES [dbo].[Forum_Threads] ([ThreadID]) ON DELETE CASCADE NOT FOR REPLICATION
GO
Uses
Used By