表名:ZL_User_FriendGroup












序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  编号
2UserIDint40    所属用户
3GroupNamevarchar500    分组名
4BlackGroupint40    是否是黑名单(1为黑名单)
5OrderIDint40    排序

简要说明:

用户好友分组表

GO
CREATE TABLE [dbo].[ZL_User_FriendGroup](
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [int] NULL,
[GroupName] [varchar](50) NULL,
[BlackGroup] [int] NULL,
[OrderID] [int] NULL,
CONSTRAINT [PK_ZL_User_FriendGroup] PRIMARY KEY NONCLUSTERED
(
[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) 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_User_FriendGroup', @level2type=N'COLUMN', @level2name=N'ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User_FriendGroup', @level2type=N'COLUMN', @level2name=N'UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分组名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User_FriendGroup', @level2type=N'COLUMN', @level2name=N'GroupName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否是黑名单(1为黑名单)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User_FriendGroup', @level2type=N'COLUMN', @level2name=N'BlackGroup'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User_FriendGroup', @level2type=N'COLUMN', @level2name=N'OrderID'



SET IDENTITY_INSERT [ZL_User_FriendGroup] ON
INSERT [ZL_User_FriendGroup] ( [ID] , [UserID] , [GroupName] , [BlackGroup] , [OrderID] ) VALUES ( 1 , 1 , '黑名单' , 1 , 99 )
INSERT [ZL_User_FriendGroup] ( [ID] , [UserID] , [GroupName] , [BlackGroup] , [OrderID] ) VALUES ( 2 , 1 , '默认分组' , 2 , 1 )
SET IDENTITY_INSERT [ZL_User_FriendGroup] OFF

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

detele from ZL_User_FriendGroup

--注意:将删除整个表

drop table ZL_User_FriendGroup

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

TRUNCATE table ZL_User_FriendGroup