首页 > 数据库技术 > 详细

mysql中表的创建,修改删除

时间:2017-10-05 19:27:08      阅读:254      评论:0      收藏:0      [点我收藏+]
create table table_user(
id int(3),
name varchar(8),
password varchar(20));#创建一个表,有3个字段

alter table table_user rename to tab_user;#更改表名

alter table tab_user add email varchar(255) not null;#添加一个字段,字段非空

alter table tab_user change id newid int(3);#修改字段名

alter table tab_user drop email;#删除一个自段

drop table tab_user;删除表

 

mysql中表的创建,修改删除

原文:http://www.cnblogs.com/imageSet/p/7629819.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!