[TOC]
## 查看數據庫:
show databases ;
## 創建數據庫:
show database xxx ;
## 創表:
create table t_student(
sid int primary key,
sname varchar(50) not null,
email varchar(200) unique,
isdel int default 1 );
## 查看表:
show table;
## 查看表內容:
show create table t_student ;
desc t_student ;
## 刪除表:
drop table t_student ;
## 修改:
### 1.添加
alter table t_student add classname varchar(50) ;
### 2.修改類型
alter table t_student modify classname int ;
### 3.修改名字
alter table t_student change classname classid int ;
### 4.刪除
alter table t_student drop classid ;
## 改表名:
rename table t_student to t_students ;
## 修改編碼:
character set gdk