数据查询(DQL):select
数据定义(DDL):create,drop,alter
数据操纵(DML):insert,update,delete
数据控制(DCL):grant,revoke
1)建立索引
普通索引
create index stusex
on student(ssex);
create index stusexandname on student(ssex,sname);//多列的
唯一索引
create unique index stusno
on student(sno);
删除索引
drop index lhh666
on lhh;
显示索引
show
index from lhh;
2)创建表,修改表
create table xxx
(xno int primary key,
xname char(
20)
not null unique,
xscore int(
5)
default 6);
alter table lhh
add lsex
char(
66);
转载于:https://www.cnblogs.com/lhh666/p/11553054.html
相关资源:JAVA上百实例源码以及开源项目