Limiting the size of the returned result set in Oracle is similar to mysql's limit (translation)-database related-PHP tutorial-_PHP tutorial

WBOY
Release: 2016-07-13 16:58:27
Original
795 people have browsed it

Oracle does not support limit similar to MySQL. But you can still use rownum to limit the number of rows in the returned result set.
If you only want to return the first ten rows of records, you can write like this:
SELECT * FROM table WHERE ROWNUM<10;
But the following statement is incorrect:
SELECT * FROM table WHERE ROWNUM>90 AND ROWNUM<100;
This is because Oracle believes that this condition is not true, so it does not return.
You should write like this:
SELECT * FROM table WHERE ROWNUM<101;
minus
SELECT * FROM table WHERE ROWNUM<91;

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631435.htmlTechArticleOracle does not support limit similar to MySQL. But you can still use rownum to limit the number of rows in the returned result set. . If you only want to return the first ten rows of records, you can write like this: SELECT * F...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template