赞
踩
create table [表名](
属性名称 属性约束...
)character set [字符集] collate [检验规则] engine [引擎] ;--没有设置也会有默认的
show create table [ 表名]; 类似于:desc [表名];
alter table 【表操作add modify drop】 属性 属性约束
add:添加列
我们还可以在指定位置添加数据:
alter table [表名] add [属性名] [ 属性约束] after [属性名] / first
modify:修改列 修改字段长度的时候注意呦。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。