Querying the first 10 pieces of data in oracle:
Querying the first 10 pieces of data in oracle is different from that in sql server.
sql server:
SELECT top 10 * FROM EMP ORDER BY sal DESC;
In sql server, top is used to represent the first 10 pieces of information.
oracle:
SELECT * FROM EMP WHERE ROWNUM <= 10 ORDER BY sal DESC;
In Oracle, ROWNUM is used to represent the first 10 pieces of information.
Oracle related introduction:
Oracle, the full name of Oracle Corporation (Oracle Software Systems Co., Ltd.), is the world's largest enterprise software company, headquartered in Redwood Beach, California, USA. Officially entered the Chinese market in 1989. In 2013, Oracle surpassed IBM and became the world's second largest software company after Microsoft.
Recommended tutorial: "Oracle Tutorial"
The above is the detailed content of How to query the first 10 pieces of data in Oracle. For more information, please follow other related articles on the PHP Chinese website!