
数据库
数据库
学 无止境
知识的海洋里无穷无尽
展开
-
MySQL函数find_in_set
MySQL函数find_in_set原创 2023-02-21 17:41:05 · 189 阅读 · 0 评论 -
分组排序取前n行数据
mysql分组排序查取前n条数据原创 2022-12-08 11:03:11 · 208 阅读 · 0 评论 -
explain的sql优化详解
explain的sql优化详解转载 2022-09-13 15:48:29 · 1712 阅读 · 0 评论 -
Oracle Mysql 模糊查询SQL
MYSQL中的模糊查询和ORACLE中的instr(str,substr)函数有同样的查询效果。select * from tableName where name like '%helloworld%'; --(mysql)select * from tableName where instr(name,'helloworld')>0; --(oracle)两条语句效果一样原创 2021-10-14 14:36:37 · 212 阅读 · 0 评论 -
Oracle 一列数据转为一行字符串 函数
将查出的一列值使用分隔符隔开,成为一条数据!(一般搭配group by使用)wm_concat()函数foods表结构idnametype1苹果12馒头23橘子14大虾35面包2SQL语句-- 默认逗号分隔SELECT wm_concat("foods"."name") as resultFROM "foods" GROUP BY "foods"."type"结果自定义分隔符-- repl.原创 2021-10-14 13:58:23 · 1991 阅读 · 1 评论