mysql学习

时间:2014-05-13 18:43:29   收藏:0   阅读:325

最近关注尚学堂的学习视频,关于bbs的一个项目学习,开始重新整理mysql的学习内容和知识点,

在实际运用中把mysql的灵魂发挥到实质!

首先看下bbs的数据库创建代码:

bbs.sql文件

bubuko.com,布布扣
 1     create database bbs;   
 2        
 3     use bbs;   
 4        
 5     create table article    
 6     (   
 7     id int primary key auto_increment,   
 8     pid int,   
 9     rootid int,   
10     title varchar(255),   
11     cont text,   
12     pdate datetime,   
13     isleaf int #1-not leaf 0-leaf   
14     );   
15        
16     insert into article values (null, 0, 1, ‘蚂蚁大战大象‘, ‘蚂蚁大战大象‘, now(), 1);   
17     insert into article values (null, 1, 1, ‘大象被打趴下了‘, ‘大象被打趴下了‘,now(), 1);   
18     insert into article values (null, 2, 1, ‘蚂蚁也不好过‘,‘蚂蚁也不好过‘, now(), 0);   
19     insert into article values (null, 2, 1, ‘瞎说‘, ‘瞎说‘, now(), 1);   
20     insert into article values (null, 4, 1, ‘没有瞎说‘, ‘没有瞎说‘, now(), 0);   
21     insert into article values (null, 1, 1, ‘怎么可能‘, ‘怎么可能‘, now(), 1);   
22     insert into article values (null, 6, 1, ‘怎么没有可能‘, ‘怎么没有可能‘, now(), 0);   
23     insert into article values (null, 6, 1, ‘可能性是很大的‘, ‘可能性是很大的‘, now(), 0);   
24     insert into article values (null, 2, 1, ‘大象进医院了‘, ‘大象进医院了‘, now(), 1);   
25     insert into article values (null, 9, 1, ‘护士是蚂蚁‘, ‘护士是蚂蚁‘, now(), 0);  
bubuko.com,布布扣

 

  

mysql学习,布布扣,bubuko.com

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!