创建数据库

/*==============================================================*/
/* 在表sysobjects中查找有没有“newsContent”的记录,有就将数据库中的表删除
/*==============================================================*/
 
 
if exists (select 1
            from sysobjects
           where id = object_id('newsContent')
            and   type = 'U')
   drop table newsContent
go
 
 
/*==============================================================*/
/* Table: newsContent                                            */
/*==============================================================*/
create table newsContent (
   ID           int              identity(1,1)   primary key,
   Title          nvarchar(50)     not null,
   Content       ntext            not null,
   AddDate      datetime         not null,
  CategoryID    int              not null
)
go

posted @ 2012-12-31 00:03  yunchong1019  阅读(111)  评论(0编辑  收藏  举报