2、备份booksDB数据库中的books表
3、使用mysqldump备份booksDB和test数据库
4、使用mysql命令还原第二题导出的books表
5、进入数据库使用source命令还原第二题导出的book表
二、索引
1、建立一个utf8编码的数据库test1
mysql> create database test1 character set utf8;
2、建立商品表goods和栏目表category
mysql> create table goods(
goods_id int(11) primary key auto_increment,
goods_name varchar(20) not null,
cat_id int(11) not null,
brand_id int(11) not null,
goods_sn char(12) not null,
shop_price float(6,2) not null,
goods_desc text) engine=myisam charset=utf8;
mysql> create table category(
cat_id int(11) primary key auto_increment,
cate_name varchar(20) not null,
parent_id int(11) not null) engine=myisam charset=utf8;
3、删除 goods 表中的 goods_desc 字段及货号字段,并增加 click_count 字段
4、在 goods_name 列上加唯一性索引(用alter table方式)
5、在 shop_price 列上加普通索引(用create index方式)
mysql> create index s_price on goods(shop_price);
6、在 click_count 上增加普通索引,然后再删除。