数据库

create database 数据库名;

drop database 数据库名;

alter database 数据库名 character set 字符集;

show databases;
show create database 数据库名;

数据表

create table 表名 (字段名 字段类型, 字段名 字段类型, ...);

drop table 表名;
truncate table 表名;

alter table 表名 add 字段名 字段类型;
alter table 表名 drop column 字段名;

show tables;
desc 表名;
show create table 表名;

数据

insert into tb_name (字段名1, 字段名2, ...) values (字段值1, 字段值2, ...);

delete from 表名 where 条件;

update 表名 set 字段名1 = 字段值1, 字段名2 = 字段值2, ... where 条件;

select * from 表名 where 条件;
select 字段名1, 字段名2, ... from 表名 where 条件;