LIMIT [oracle] - SQL/NoSQL - Programmation
Marsh Posté le 01-07-2003 à 23:47:33
bon j'ai trouvé qu'on pouvait faire
select ... where rownum < limite
mais je sais toujours pas par exemple avoir les lignes 50 à 100
edit:
bon ben voilà...
ROWNUM returns a number indicating the sequence in which a row was selected from a table. The first row selected has a ROWNUM of 1, the second row has a ROWNUM of 2, and so on. If a SELECT statement includes an ORDER BY clause, ROWNUMs are assigned to the selected rows before the sort is done.
You can use ROWNUM to limit the number of rows returned by a SELECT statement. Also, you can use ROWNUM in an UPDATE statement to assign unique values to each row in a table. Using ROWNUM in the WHERE clause does not stop the processing of a SELECT statement; it just limits the number of rows retrieved. The only meaningful use of ROWNUM in a WHERE clause is
... WHERE ROWNUM < constant
because the value of ROWNUM increases only when a row is retrieved. The following search condition can never be met because the first four rows are not retrieved:
... WHERE ROWNUM = 5
the only caveat to this is ... WHERE ROWNUM = 1
Marsh Posté le 01-07-2003 à 23:24:00
youp,
c'est possible de faire un LIMIT comme dans mysql pour afficher n'avoir qu'un certain nombre de ligne de la requete avec ORACLE ?
apparemment non, mais y a peut etre un moyen
merci
je suis neuneu ! n'est-ce pas ?
---------------
oui oui