
练习
文章平均质量分 74
Java_Eastlin
JAVA-Eastlin:请留下你的赞,证明你来过
展开
-
8mysql练习
原创 2022-02-28 11:30:00 · 124 阅读 · 0 评论 -
7.mysql用户管理,总结-count,exists,in,view易错点
1.理论/*创建本地用户teacher,密码为123456,本地用户student,无密码*/create user `teacher`@`localhost` identified by '123456';CREATE USER `student`@`localhost`;/*通过查看系统数据库mysql中的user表查看存在用户*/use mysql;select * from user;/*删除用户*/drop user if exists `teacher`@`localho.原创 2022-02-25 11:30:00 · 677 阅读 · 0 评论 -
5.mysql练习--数据库备份-dos相关,截图笔记
引擎,改变表查看/*使用全文索引查询*/SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('database');/*EXPLAIN函数,分析select语句,注意以下要在dos中登录mysql后执行*/use myschool;EXPLAINSELECT * FROM articles WHERE MATCH (title,body) AGAINST ('database') \G;...原创 2022-02-24 11:30:00 · 317 阅读 · 0 评论 -
4.mysql知识兼练习(不好抽象出来总结)
/*编写SQL语句,查看年龄比'李斯文'小的学生,要求显示这些学生的信息 ?*/select * from studentwhere borndate>(select borndate from student where studentname='李斯文');#查询“Java”课程至少一次考试刚好等于60分的学生姓名#1.表连接select distinct studentnamefrom student join resulton student.studentno=res原创 2022-02-21 11:30:00 · 391 阅读 · 0 评论 -
2.mysql练习(查询进阶)
/*##### 表2 category */#自连接查询#表结构语句selectc1.categoryname as '父结点',c2.categoryName as '子结点'from category c1,category c2where c1.categoryid=c2.pid;/* *##### 表3 card *//*某公司印了一批充值卡,卡的密码是随机生成的,现在出现这个问题卡里面的字母"O和数字0"、"字母i和数字...原创 2022-02-20 11:30:00 · 476 阅读 · 0 评论 -
1.mysql练习(基础理解)
1.创建表,初始数据#创建年级表---1drop table if exists grade;create table grade( gradeid int auto_increment primary key comment '年级id', gradename varchar(10) not null comment '年级名称') comment='年级表';insert into grade(gradename) values('s1');#一次插一条记录`grade`in...原创 2022-02-19 11:30:00 · 872 阅读 · 0 评论