DB_51Aspx/创建数据库(sqlserver).sql

(开头部分) 93KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*==============================================================*/
/* Database name:  zhouli                                       */
/* DBMS name:      Microsoft SQL Server 2012                    */
/* Created on:     2019-11-08 9:36:52                           */
/*==============================================================*/


drop database zhouli
go

/*==============================================================*/
/* Database: zhouli                                             */
/*==============================================================*/
create database zhouli
go

use zhouli
go

/*==============================================================*/
/* Table: blog_article                                          */
/*==============================================================*/
create table blog_article (
   article_id           int                  identity,
   article_title        nvarchar(200)        not null,
   article_thrink       varchar(100)         not null,
   article_body         text                 not null,
   article_body_markdown text                 null,
   article_body_summary nvarchar(100)        null,
   article_sort_value   int                  not null default 0,
   create_user_id       varchar(36)          null,
   create_time          datetime             not null,
   edit_time            datetime             null,
   delete_sign          int                  not null default 1,
   delete_time          datetime             null,
   note                 nvarchar(2048)       null,
   constraint PK_BLOG_ARTICLE primary key nonclustered (article_id)
)
go

if exists (select 1 from  sys.extended_properties
           where major_id = object_id('blog_article') and minor_id = 0)
begin 
   declare @CurrentUser sysname 
select @CurrentUser = user_name() 
execute sp_dropextendedproperty 'MS_Description',  
   'user', @CurrentUser, 'table', 'blog_article' 
 
end 


select @CurrentUser = user_name() 
execute sp_addextendedproperty 'MS_Description',  
   '博客文章表', 
   'user', @CurrentUser, 'table', 'blog_article'
go

if exists(select 1 from sys.extended_properties p where
      p.major_id = object_id('blog_article')
  and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'article_id')
后面还有 2808 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。