![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MySQL
文章平均质量分 77
sunye_2010
这个作者很懒,什么都没留下…
展开
-
Mysql自学笔记三
1.创建表 create table student( stid int auto_increment primary key, sname varchar(10) not null, sex enum('男','女','保密'), depet varchar(10) not null default '计算机科学与技术', score float )auto_increment=1原创 2016-07-19 09:40:01 · 362 阅读 · 0 评论 -
Mysql自学笔记四
1.表的约束 主键约束--primary key,主键自带索引,关系数据库要求一个表只有一个主键或复合主键 primary key(id,name)只要id和name其中有一个唯一就行 默认约束--default--5.0以后只能使用常量,不能使用函数、表达式 非空约束--not null 外键约束--foreign k原创 2016-07-27 13:49:51 · 274 阅读 · 0 评论 -
Mysql自学笔记一
1.mysql中表的字符集设置为utf8,但是在navicat piemium中中文仍显示乱码,解决方案 navicat piemium中选中数据库服务器连接-右键-连接属性-高级-将编码集设置为‘10008-GB2312’ 2.建表语句为: create table t1( tid int not null auto_increment ,原创 2016-06-22 09:16:11 · 175 阅读 · 0 评论 -
Mysql自学笔记二
1.dos中启动mysql a.先到达mysql安装文件的bin文件下 cd\是返回根目录 d:直接跳转到d盘 输入cd program files时,可以使用快捷键tab,及输入cd pro+tab即可 mysql -uroot(以root用户登录)-hlocalhost(登录本机服务器) -p111111(密码为111111) 2.查询数据库版本 select versi原创 2016-07-19 09:20:04 · 212 阅读 · 0 评论 -
Mysql自学笔记五(存储过程)
1.存储过程--存储过程是编译后在服务器执行,速度快 2.定义存储过程 delimiter // create procedure pro1(in/out/inout para) begin declare var int; set var=para; if var>1 select sname from student; else select age from studen原创 2016-07-28 11:37:34 · 240 阅读 · 0 评论