![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
置酒天晴
一个卑微的前端cv工程师
展开
-
mysql学习笔记(五)—— 11-20题练习讲解
1. 修改Customer表中客户姓名是“李立”的联系方式为15119280983 UPDATE customer SET phone = 15119280983 where custname='李立'; 2. 查询出能够容纳12人以上的最合适的包厢信息。 select * from box where boxcapacity >= 12 and boxstatus = '空闲' 3. 查询可容纳人数最多的包厢信息。 select * from box where boxcapacity=原创 2021-07-27 16:09:24 · 346 阅读 · 0 评论 -
mysql学习笔记(四)—— 1-10题练习讲解
1、 查询student表的所有数据。 select * from student; 2、 查询student表中sname、ssex。 select sname,ssex from student; 3、 查询教师所有的单位即不重复的depart列。 select depart from teacher GROUP BY depart; 4、 查询score表中成绩在60到80之间的所有记录。 select * from score where score >= 60 and score <=原创 2021-07-23 20:06:50 · 588 阅读 · 0 评论 -
mysql学习笔记(三)—— 练习表搭建
-- 表结构 -- 学生信息表(student) CREATE TABLE IF NOT EXISTS `student`( `sno` VARCHAR(20) NOT NULL, `sname` VARCHAR(20) NOT NULL, `sbirth` DATE NOT NULL, `ssex` VARCHAR(20) NOT NULL, PRIMARY KEY ( `sno` ) )ENGINE=InnoDB DEFAULT CHARSET=utf8; -- 课原创 2021-07-23 20:03:18 · 233 阅读 · 0 评论 -
mysql学习笔记(二)—— 建表约束
建表约束主键约束自增约束唯一约束非空约束默认约束外键约束 主键约束 它能够唯一确定一张表中的一条记录,也就是我们通过某个字段添加约束,就可以是的该字段不重复且不为空。 create table user( id int primary key, name VARCHAR(20) ) 联合主键:只要联合的主键加起来不重复就可以 这样id 和uname 就允许重复了 CREATE TABLE user( id INT, uname VARCHAR(20), passwords VARCHAR(原创 2021-07-23 19:50:20 · 200 阅读 · 2 评论 -
mysql学习笔记(一)—— 常用语句、关系运算符说明及常用关键字说明
常用语句基本mysql语法:一、查二、增三、删四、改 基本mysql语法: 一、查 select * from table_name; 二、增 insert into table_name(id,name) values(1,"qingkong"); 三、删 delete from table_name where name = "qingkong"; 四、改 update table_name set name = "haoren" where name = "qingkong"; ...原创 2021-07-23 18:00:18 · 201 阅读 · 2 评论