CREATE DATABASE ai_blog
GO
USE ai_blog
GO
CREATE TABLE ai_system(
system_Id INT PRIMARY KEY IDENTITY(1,1),
system_password Varchar(100),
system_passok Int,
system_Messageok Int default(0)
)
GO
CREATE TABLE ai_users(
Users_Id INT PRIMARY KEY IDENTITY(1,1),
User_Usertext Varchar(20),
User_Nickname Varchar(50),
User_Password Varchar(100),
User_Level Int default(1),
User_bdel Int default(0)
)
GO
CREATE TABLE ai_menu(
menu_Id INT PRIMARY KEY IDENTITY(1,1),
menu_Text Varchar(100)
)
GO
CREATE TABLE ai_article(
Article_id INT PRIMARY KEY IDENTITY(1,1),
menu_Id Int,
Article_title Varchar(100),
Article_text text,
Article_biaoqian Varchar(200),
Article_ding int default(0),
Article_cai int default(0),
Article_tongji int,
Article_date datetime default(getdate()),
Article_pinglunshu int default(0)
)
GO
CREATE TABLE ai_Message(
Message_Id INT PRIMARY KEY IDENTITY(1,1),
Article_id Int,
Message_user Varchar(50),
Message_text Varchar(500),
Message_lianxi Varchar(100),
Message_date datetime default(getdate()),
)
GO
CREATE TABLE ai_xiangce(
xiangce_Id	Int,
Xiangce_title	Varchar(100),
Xiangce_text	Varchar(300),
Xiangce_date	datetime,
Xiangce_fenlei	Int,
Xiangce_name	Varchar(100),
Xiangce_tuijian	int
)
GO
CREATE TABLE ai_xiangfen(
menu_Id	Int PRIMARY KEY IDENTITY(1,1),
menu_Text	Varchar(100)
)
GO
INSERT INTO ai_menu VALUES('随笔')
INSERT INTO ai_menu VALUES('日志')
INSERT INTO ai_menu VALUES('心情')
INSERT INTO ai_menu VALUES('资源')
GO
INSERT INTO ai_article VALUES(1,'标题内容,你猜猜猜','测试帖子内容标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜测试帖子内容标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜测试帖子内容标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜测试帖子内容标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜标题内容,你猜猜猜','资源,免费,测试',1,10,5,100)