![](https://img-blog.csdnimg.cn/c5da997c343142588e9073ec3adc8e9f.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
MySQL
MySQL中常见与不常见函数,经典题型
撒哈拉拉倒吧
不积跬步无以至千里,不积小流无以成江海~
展开
-
MySQL:SQL语句中出现的offset的作用
在刷Leetcode的sql题目 https://leetcode-cn.com/problems/second-highest-salary/ select (select distinct salary from Employee order by salary desc limit 1 offset 1 ) as SecondHighestSalary; 这里出现了offset,在以往面试中问到的sql题目,基本都是连接,去重,排序,没有使用过offset,查找了下这个offset的用法,意思是跳过原创 2022-03-08 19:29:09 · 1256 阅读 · 0 评论 -
MySQL中的DATEFDIFF函数
MySQL中的DATEFDIFF函数 获取两个日期的时间间隔为1天:datediff(w1.recordDate,w2.recordDate)=1 select w1.id from Weather w1,Weather w2 where datediff(w1.recordDate,w2.recordDate)=1 and w1.Temperature > w2.Temperature;原创 2022-03-08 18:01:26 · 3175 阅读 · 0 评论