04 2022 档案

摘要:https://blog.csdn.net/qq_46489900/article/details/122150056 ACID (背四大原则,其他看一下) -- mysql 默认开启事务自动提交的 (不要执行) set autocommit = 0; /* 关闭 */ set autocommit 阅读全文
posted @ 2022-04-27 10:57 天井听雨 阅读(14) 评论(0) 推荐(0) 编辑
摘要:看看 聚合函数(常用) having 必须放在group by 下面 (因为where不能使用聚集函数,要在having使用) -- 聚合函数 SELECT count(`studentname`)from student -- count(字段)能够自动省略 null 值 select count 阅读全文
posted @ 2022-04-26 22:31 天井听雨 阅读(27) 评论(0) 推荐(0) 编辑
摘要:排序 asc 升序 desc 降序 -- 排序 -- asc 升序 desc 降序 -- orde by 通过哪个字段排序,怎么排 select s.studentno,studentname,subjectname,studentresult from student s INNER JOIN r 阅读全文
posted @ 2022-04-26 15:22 天井听雨 阅读(11) 评论(0) 推荐(0) 编辑
摘要:SQL92是where连接条件 SQL99语法是on 连接条件 记住inner 需要两个表都匹配的数据,left左边的表数据都显示,right右边的表都展示,full两边的表都展示 比如innerjoin:基准是交叉部分,交叉的结果会拿出来,然后把左表和右表中符合的也拿出来 -- inner joi 阅读全文
posted @ 2022-04-25 18:36 天井听雨 阅读(104) 评论(0) 推荐(0) 编辑
摘要:指定字段查询 -- 查询全部学生, select 字段 from 表 select * from student -- 查询指定字段 select `studentno`,`loginpwd` from student -- 别名,给结果起一个名字 select `studentno` as 学号, 阅读全文
posted @ 2022-04-24 13:24 天井听雨 阅读(28) 评论(0) 推荐(0) 编辑
摘要:DML 语言 插入 insert into student(name) values('张三') -- 注意结尾是英文单引号 insert into student(name,pwd) values('李四','ab123456') insert into student(name,pwd) val 阅读全文
posted @ 2022-04-23 15:21 天井听雨 阅读(15) 评论(0) 推荐(0) 编辑
摘要:操作数据库 数据库的列类型 数据库的字段属性 create table if not exists `student`( `id`int(4) not null comment'学号', `pwd` varchar(20) default'123456' comment'密码', `naem` va 阅读全文
posted @ 2022-04-22 00:24 天井听雨 阅读(12) 评论(0) 推荐(0) 编辑
摘要:mysqld --initialize-insecure (建议使用,不设置root密码) //生成的密码在实际连接的时候可能会不小心输入错误或忘记,导致无法连接Mysql mysqld --initialize --console(不建议使用,在控制台生成一个随机的root密码) //安装mysq 阅读全文
posted @ 2022-04-21 15:58 天井听雨 阅读(45) 评论(0) 推荐(0) 编辑
摘要:集合运算练习 union(), intersection(),subtract(), cartesian() 内连接与外连接 join(), leftOuterJoin(), rightOuterJoin(), fullOuterJoin() 多个考勤文件,签到日期汇总,出勤次数统计 三、综合练习: 阅读全文
posted @ 2022-04-20 21:44 天井听雨 阅读(22) 评论(0) 推荐(0) 编辑
摘要:一、词频统计 A.分步骤实现 1.准备文件 1.下载小说或长篇新闻稿 2.上传到hdfs 启动hdfs 上传文件并查看 2.读文件创建RDD 创建SparkContext以及从文件系统中加载数据创建RDD 与原txt文件对比 3.分词 4.标点符号re.split(pattern,str),flat 阅读全文
posted @ 2022-04-11 23:05 天井听雨 阅读(34) 评论(0) 推荐(0) 编辑