Java OpenResty Spring Spring Boot MySQL Redis MongoDB PostgreSQL Linux Android Nginx 面试 小程序 Arthas JVM AQS juc Kubernetes Docker 诊断工具


Oracle 限制只返回一条记录

Oracle SQL 大约 205 字

MySQL/PostgreSQL 限制一条

使用limit关键字。

select * from test limit 1;

Oracle 限制一条

Oracle中不是使用limit,而是使用rownum关键字,并使用where条件来限制。

select * from test where rownum = 1;

限制十条:

select * from test where rownum <= 10;
阅读 7246 · 发布于 2020-05-16

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb

扫描下方二维码关注公众号和小程序↓↓↓

扫描二维码关注我
昵称:
随便看看 换一批