当前位置:网站首页>The number of distinct data in the query table count MySQL Oracle takes the specified number
The number of distinct data in the query table count MySQL Oracle takes the specified number
2022-04-22 16:06:00 【nongcunqq】
mysql
The correct way to write it is select count() from (select distinct() from ) a , Note that you must alias the watch a.
limit take 3 strip offset Start with the second one
SELECT count(*) from ( SELECT distinct project from h_record) a
SELECT distinct project from h_record LIMIT 3 OFFSET 2
select count(*) from (select distinct(*) from ) a
oracle
Take the top ten , Inquire about distinct Quantitative grammar and mysql Agreement
SELECT count(*) from ( SELECT distinct project from h_record) a
sqlStatement = f'SELECT * FROM ({
sqlStatement}) WHERE ROWNUM <=10 '
Take any entry
sqlStatement = f'SELECT * FROM (SELECT m.*, ROWNUM NUM FROM ({
sqlStatement}) m ) WHERE NUM <= 10000 AND num >5000 '
come from Stack Overflow
SELECT * from
(
select m.*, rownum r
from maps006 m
)
where r > 49 and r < 101

Reference resources
https://stackoverflow.com/questions/4552769/sql-rownum-how-to-return-rows-between-a-specific-range
Reference resources
https://blog.csdn.net/ccmedu/article/details/84069311
版权声明
本文为[nongcunqq]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221603373102.html
边栏推荐
- Shell script attempt
- Computer taskbar stuck
- Jmeter 存取Sql Server带有逗号‘,‘的数据到csv文件
- One page submits two forms to the same place
- 342-Leetcode 字符串中的第一个唯一字符
- How can AI intelligent video technology be applied to the scene of daily maintenance and supervision of cultural relics and historic buildings?
- Spark basic learning notes 23: dataframe and dataset
- 【经验分享】为什么视频画面解码失败之后显示的是绿幕?
- 实验三 FFT及其在卷积计算和谱分析中的应用
- 【洛谷】P1036 [NOIP2002 普及组] 选数(DFS)
猜你喜欢

Crystal Chem β-乳球蛋白 ELISA 试剂盒 II说明书

How can AI intelligent video technology be applied to the scene of daily maintenance and supervision of cultural relics and historic buildings?

哈希表篇(二)

Altium designer generates PCB production files and proofing process (taking jialichuang mall as an example)

Hash table (II)

NFT platform security guide

Weekly recommended short video: how to reconstruct the core competitiveness of enterprises in the stock era?

【ARM汇编】如何对键入数据做判断?

How to reduce the cost of Alibaba cloud international server after website optimization

牛客SQL刷题记录
随机推荐
Altium designer 生成PCB制作文件及打样流程(以嘉立创商城为例)
[untitled] order and payment
JUC(三)ThreadLocal
Is the account of digging money safe? How to handle it?
Eltable style modification. Parent child components pass values. Fuzzy query
引入文件路径问题-$_SERVER[‘DOCUMENT_ROOT‘]代表网站根目录
343-Leetcode 反转字符串中的元音字母
使用js完成文字根据输入框内数字在屏幕上移动
redis简单存储建立文件夹
Shell脚本尝试
Displays whether it is urgent
mysql 数据库优化
太卷了~(2022版)大厂面经 + 详细笔记帮你搞定面试
颜色分类--脑筋急转弯型--训练逻辑[堆排|单指针|双指针]
远程桌面失败解决办法
NFT platform security guide
企业级知识管理(KM)建设方法及过程
OopMap理论篇
极狐产品口碑零差评 北汽蓝谷以高端硬核实力俘获用户芳心
Servlet基础