![](https://img-blog.csdnimg.cn/20200225224712605.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
数据库
分享和数据库相关的东西,主要是传统的关系型数据库的内容
明日江郎
技术立身
展开
-
技.艺.道:SQL的各种join与开窗函数
一、join在多表关联查询场景中,join是常用的方式。join,汉译为“连接”。连接分为内连接(inner join)和外连接(out join)。外连接分为左外连接和右外连接和全外连接,它们由分别简称为“左连接(left join)”、“右连接(right join)”和“全连接(full join)”。当只使用关键字“join”时,等同于内连接(inner join)。0.准备数据-- 1.学生表:学号,姓名,性别,年龄-- 1)建表:create table t_student(p原创 2020-06-09 15:41:37 · 1194 阅读 · 0 评论 -
用MySQL实现准实时推荐
1.目的:用SQL语句实现完整的咨询推荐流程(纯属娱乐)2.SQL代码创建存储过程CREATE PROCEDURE pr_recommend(a INT,b INT)BEGIN SELECT tb.userid,ta.f_article_id FROM t_plat_send_history ta, ( SELECT DISTINCT t1.s_user_id useri原创 2017-07-22 13:28:08 · 723 阅读 · 0 评论 -
windows环境下安装MySQL8
1.下载MYSQL服务下载地址:https://dev.mysql.com/downloads/mysql/2.解压3.修改配置在解压出的文件主目录中创建一个文本文件:my.ini内容: [mysqld] # Remove leading # and set to the amount of RAM for the most important data ...原创 2018-11-28 13:55:04 · 238 阅读 · 0 评论