发表于: 2016-12-24 12:34:14

1 2183


今天完成:

1.创建表

create table task1(ID int not null auto_increment primary key,

    -> create_at int,

    -> update_at int,

    -> name varchar(20),

    -> QQ int,

    -> learning_type varchar(30));

2.插入数据:

mysql> insert into task1 (ID,create_at,update_at,name,QQ,learning_type)

    -> value (1,20161224,20161224,"李博宇",870015089,"前端工程师");

Query OK, 1 row affected (0.06 sec)

mysql> select * from task1;

3.增加列,更新数据

 alter table task1 add declaration varchar(100);

 update task1 set declaration='努力学,对得起自己' where ID=1;

 update task1 set declaration='努力学,对得起自己' where ID=1;

4.备份,删除,恢复

备份:

删除:

恢复:

建立索引:

插入数据:

检索:有索引的一次,没索引的11次

明天做JAVA部分;

遇到的问题:

在使用chcp 65001 因为不能输入中文,又换回chcp 936 后,在CMD下的中文字符竟然能正常显示了,按理来说因为编码不同应该为乱码,不清楚在使用chcp 65001后注册表到底改了啥,也不清楚如何变回会显示乱码的CMD窗口。


收获:熟悉mysql 的操作


返回列表 返回列表
评论

    分享到