创建数据库表 haha 并写入字段
create table haha (
user_name varchar(32),
age int,
sin_date date
);
向字段写入数据
insert into xx VALUE('xixi','12','2016-12-12');
insert into xx values('wangwang','20','2016-12-08')
查询标的内容
select * from xx where user_name = 'xixi'select * from xx where user_name = 'xixi';
更新数据
update xx set age ='29' where user_name ='xixi';
删除数据
delete from xx where user_name = 'xixi';
增加字段
alter table xx add e_mail varchar(32);
select * from xx;
删除字段
alter table xx drop e_mail;
改变字段属性(原字段age 改为 user_age)
alter table xx change age user_age int;
select * from xx;
改变表中字段的属性
alter table xx change user_age user_age varchar(32) not null;
修改表名
alter table xx rename user_name ;
删除表
drop table user_name;