表名:ZL_Chat












序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40   
2Contentnvarchar10000    内容
3SendDatetimedatetime83    发送时间
4SendUserIDint40    发送者
5AdmitUserIdint40    接收者
6typeint40    消息类型
7All_Peoplevarchar50000    接收人ids
8ImgUrlnvarchar5000    上传图片
9Roomidint40    房间号
10stateint40   0状态

简要说明:

聊天记录表

GO
CREATE TABLE [dbo].[ZL_Chat](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Content] [nvarchar](1000) NULL,
[SendDatetime] [datetime] NULL,
[SendUserID] [int] NULL,
[AdmitUserId] [int] NULL,
[type] [int] NULL,
[All_People] [varchar](5000) NULL,
[ImgUrl] [nvarchar](500) NULL,
[Roomid] [int] NULL,
[state] [int] DEFAULT (0)
CONSTRAINT [PK_ZL_Chat] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'SendDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'SendUserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接收者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'AdmitUserId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上传图片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'ImgUrl'

--注意:将清空全表数据

detele from ZL_Chat

--注意:将删除整个表

drop table ZL_Chat

--注意:清空且复位表ID序列为初始值

TRUNCATE table ZL_Chat