//创建表 create table user( tutorial_id INT NOT NULL AUTO_INCREMENT, tutorial_title VARCHAR(100) NOT NULL, tutorial_author VARCHAR(40) NOT NULL, submission_date DATE, PRIMARY KEY ( tutorial_id ) ); Query OK, 0 rows affected (0.61 sec)
//创建banner表 create table banner( id INT NOT NULL AUTO_INCREMENT, img_url varchar(255) NOT NULL, web_url text NOT NULL, addtime datetime, PRIMARY KEY ( id ) );
//创建表3 create table room( `uid` int(11) COMMENT '用户ID', `subject` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '房间标题', `praise_num` int(20) DEFAULT '0' COMMENT '点赞数', `gold_num` int(20) DEFAULT '0' COMMENT '本直播获得贝壳数', `watch_num` int(11) DEFAULT '0' COMMENT '观看次数', `review_url` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '回放地址URL', `addtime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `endtime` timestamp NULL DEFAULT NULL COMMENT '结束时间', PRIMARY KEY ( uid ) ); //删除表 DROP TABLE user;