SQL语句学习

创建数据库:

create database db_name 
drop database db_name

创建表:

create table tb_name like tb_old_name
drop table tb_name

 

 
创建索引:

create index 索引名称 on 表名称 (列名称,。。。) create index personIndex on person (lastName)

增加表列:

alter table tb_name add column address varchar(80) not null;

删除数据:

delete from tb_name where id=3;

插入数据:

insert into tb_name(number,name,birthday) values
(5,'cxx5',now()),(6,'cxx6',now()),(7,'cxx7',now());








 
posted @ 2017-05-11 13:26  WilliamHu  阅读(90)  评论(0编辑  收藏  举报