![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MYSQL
unixcs、
这个作者很懒,什么都没留下…
展开
-
Mysql 表的增删改查
构建表ID姓名公司工资饭补create table class(id int primary key auto_increment,sname varchar(10)not null default'',gender char(1)not null default'',company varchar(20)not null default'',salary decimal(6,...原创 2018-12-13 20:19:16 · 359 阅读 · 0 评论 -
MYSQL 字符类型
建表的过程,就是画表头的过程 //声明表头建表的过程就是一个 声明字段 过程建列时,—> 能够容纳放置的的内容,但又不浪费存储同样的数据,不同的列类型,所占的空间和效率是不一样的。 这就是我们建表前 列类型的意义数值型整形Tinyint占据空间:1字节,存储范围:-128—127,0—255(2的8次方-1)Smallint占据空间:2字节,存储范围 :-3276...原创 2018-12-17 09:37:33 · 854 阅读 · 0 评论 -
mysql建表
当所有的列都是定长时,仅有一个时不定长列时可以把不定长转换为定长。空间换时间 空间<——>时间代码:mysql> create table member ( -> id int unsigned auto_increment primary key, -> username char(20) not null default '',...原创 2018-12-18 11:36:02 · 6250 阅读 · 0 评论 -
MYSQL 修改表
增加列alter table表名 add列名称 列类型 列参数;例:alter table m1 add birth date not null default '0000-00-00';增加列(指定在某列之后)alter table表名 add列名称 列类型 列参数 after 某列;例:alter table m1 add gender char(1) not null defau...原创 2018-12-18 16:51:36 · 206 阅读 · 0 评论