表名:ZL_Card












序号列名数据类型长度小数位标识主键外键允许空默认值说明
1Card_IDint40  主键
2CardNumnvarchar500    卡片编号
3CardPwdnvarchar500    卡片密码
4PutUserIDint40    发放卡片加盟商
5AssociateUserIDint40    关联用户
6VIPTypeint40    VIP类型
7StartTimenvarchar500    第一次使用时间
8CircumscribeTimedatetime83    使用年限
9PlyNumint40    使用次数
10AddTimedatetime83    卡片创建时间
11CardStateint40    卡片状态 1:未开启,2:开启,3:停用
12ActivateStateint40    激活状态, 0:未使用,1:已使用
13ActivateUserIDint40    激活用户ID
14Remindnvarchar2000    备注

简要说明:

用户点卡表

GO
CREATE TABLE [dbo].[ZL_Card](
[Card_ID] [int] IDENTITY(1,1) NOT NULL,
[CardNum] [nvarchar](50) NULL,
[CardPwd] [nvarchar](50) NULL,
[PutUserID] [int] NULL,
[AssociateUserID] [int] NULL,
[VIPType] [int] NULL,
[StartTime] [nvarchar](50) NULL,
[CircumscribeTime] [datetime] NULL,
[PlyNum] [int] NULL,
[AddTime] [datetime] NULL,
[CardState] [int] NULL,
[ActivateState] [int] NULL,
[ActivateUserID] [int] NULL,
[Remind] [nvarchar](200) NULL,
CONSTRAINT [PK_ZL_Card] PRIMARY KEY CLUSTERED
([Card_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_Card', @level2type=N'COLUMN',@level2name=N'CardNum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卡片密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'CardPwd'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发放卡片加盟商' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'PutUserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关联用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'AssociateUserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'VIP类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'VIPType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'第一次使用时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'StartTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用年限' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'CircumscribeTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'PlyNum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卡片创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'AddTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卡片状态 1:未开启,2:开启,3:停用' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Card', @level2type=N'COLUMN',@level2name=N'CardState'

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

detele from ZL_Card

--注意:将删除整个表

drop table ZL_Card

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

TRUNCATE table ZL_Card