/****** オブジェクト : テーブル [dbo].[tbl_article] スクリプト日付 : 99/05/02 午後 04:09:49 ******/
CREATE TABLE [dbo].[tbl_article] (
    [mess_id] [int] IDENTITY (1, 1) NOT NULL ,
    [refer_id] [int] NULL ,
    [sender] [varchar] (100) NULL ,
    [sender_addr] [varchar] (100) NULL ,
    [url] [varchar] (100) NULL ,
    [subject] [varchar] (256) NULL ,
    [status] [tinyint] NULL ,
    [th_level] [tinyint] NULL ,
    [pwd] [varchar] (20) NULL ,
    [body] [varchar] (8000) NULL ,
    [update_date] [datetime] NULL ,
    [last_changed] [timestamp] NULL
)
GO

CREATE CLUSTERED INDEX [IDX_tbl_article] ON [dbo].[tbl_article]([refer_id], [th_level]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbl_article] WITH NOCHECK ADD
    CONSTRAINT [DF_tbl_article_status] DEFAULT (1) FOR [status],
    CONSTRAINT [DF_tbl_article_th_level] DEFAULT (0) FOR [th_level]
GO

CREATE UNIQUE INDEX [IDX_tbl_article01] ON [dbo].[tbl_article]([mess_id]) ON [PRIMARY]
GO

CREATE INDEX [IDX_tbl_article02] ON [dbo].[tbl_article]([th_level]) ON [PRIMARY]
GO