库
1. 建立库mysql
create
database
test;
sql
create
database
redmine
character
set
utf8;
3#验证show
create
database
redmine\G;
spa
*************************** 1. row ***************************
Database: redmine
Create Database: CREATE DATABASE `redmine` /*!40100 DEFAULT CHARACTER SET utf8 */
1 row in set (0.00 sec)
2. 删除库drop
database
test;
.net
3. 列出所有的库code
show databases;blog
表
1. 建立表rem
create
table
test (c1
int
(10),c2
int
(10), c3
int
(10),c4
char
(10));
get
2. 表结构io
desc
test;
show
create
table
test;
3. 删除表
drop
table
test;
4. 列出当前库所有表
show tables;
5. 备份表(20160310)create table reply_bak
select
* from reply;