29 comments. Current rating: (17 votes). Leave comments and/ or rate it.
I have got a query that returns thousands of rows but I'm only interested in the first 20 records. In mysql I can limit the returned data (and thus the network traffic) with the LIMIT start,number clause, where start is the starting row and number is the number of rows that I want to see.
Is something similar possible in Oracle as well?
Oracle has a system attribute ROWNUM for each record returned. A query that only returns the first 20 records would look like the one in the example.
ROWNUM starts counting with 1.
// mysqlselect col from tbl limit 20;
// Oracleselect col from tbl where rownum<=20;
// Microsoft SQLselecttop 20 col from tbl;
Hey! Do you know if they make any plugins to protect against hackers?
I'm kinda paranoid about losing everything I've worked hard on.
Conrad from Rio De Janeiro, Brazil
I have noticed you don't monetize your site, don't waste your traffic,
you can earn extra cash every month because you've got hi quality content.
If you want to know how to make extra $$$, search for: Boorfe's
tips best adsense alternative
Jacques from São Paulo, Brazil
Hi blogger, i must say you have high quality posts here.
Your page can go viral. You need initial traffic only.
How to get it? Search for: make your content go viral Wrastain's tools