表名:ZL_Favorite












序号列名数据类型长度小数位标识主键外键允许空默认值说明
1FavoriteIDint40   收藏ID
2Ownerint40    收藏人ID
3InfoIDint40    被收藏内容的ID
4FavoriteDatedatetime83   getdate收藏时间
5FavoriTypeint40    收藏类型:1为内容收藏,2为商品收藏,3为网店收藏
6FavUrlnvarchar5000    收藏URl
7FavItemIDnvarchar500    收藏相关内容ID(多个ID以逗号隔开)
8Titlenvarchar5000    标题

简要说明:

收藏表

GO
CREATE TABLE [dbo].[ZL_Favorite](
[FavoriteID] [int] IDENTITY(1,1) NOT NULL,
[Owner] [int] NOT NULL,
[InfoID] [int] NOT NULL,
[FavoriteDate] [datetime] NOT NULL,
[FavoriType] [int] NULL,
[FavUrl] [nvarchar](500) NULL,
[FavItemID] [nvarchar](50) NULL,
[Title] [nvarchar](500) NULL
) ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavoriteID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏人ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'Owner'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被收藏内容的ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'InfoID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavoriteDate'
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_Favorite', @level2type=N'COLUMN',@level2name=N'FavoriType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏URl' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavUrl'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏相关内容ID(多个ID以逗号隔开)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavItemID'
GO
ALTER TABLE [dbo].[ZL_Favorite] ADD  CONSTRAINT [DF_ZL_Favorite_FavoriteDate]  DEFAULT (getdate()) FOR [FavoriteDate]

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

detele from ZL_Favorite

--注意:将删除整个表

drop table ZL_Favorite

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

TRUNCATE table ZL_Favorite