序号 | 列名 | 数据类型 | 长度 | 小数位 | 标识 | 主键 | 外键 | 允许空 | 默认值 | 说明 |
1 | ID | int | 4 | 0 | 是 | 是 | 否 | 编号 | ||
2 | UserID | int | 4 | 0 | 是 | 所属用户 | ||||
3 | GroupName | varchar | 50 | 0 | 是 | 分组名 | ||||
4 | BlackGroup | int | 4 | 0 | 是 | 是否是黑名单(1为黑名单) | ||||
5 | OrderID | int | 4 | 0 | 是 | 排序 |
用户好友分组表
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
TRUNCATE table ZL_User_FriendGroup