Pages
Home
Legal
About me
How To
Source Code
Publications
Sheet music
Finance
Link dump
Comics
08/06/2012
[SQL] Oracle LIMIT clause
To limit the number of rows returned by a query, in standard SQL you would:
SELECT *
FROM table
WHERE [conditions]
LIMIT number
In Oracle you just add ROWNUM to the WHERE clause like:
SELECT *
FROM table
WHERE [conditions] AND ROWNUM=1
To have the equivalent of SQL "LIMIT 1"
No comments:
Post a Comment
With great power comes great responsibility
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
With great power comes great responsibility