Krogoth Posted April 20, 2006 Share Posted April 20, 2006 Existe-il une syntaxe sql simple permettant de ne retourner que les 10 premieres valeure par exemple d'une grosse tables? Link to comment Share on other sites More sharing options...
Baldurien Posted April 20, 2006 Share Posted April 20, 2006 En mySQL/pgSQL : LIMIT count [OFFSET startOffset] En je sais plus quel dialecte : SELECT TOP count (-> LIMIT 10) Sinon je sais pas. (ceci étant dit, la question reste intéressante) Link to comment Share on other sites More sharing options...
Krogoth Posted April 20, 2006 Author Share Posted April 20, 2006 En DB2 une idée? Link to comment Share on other sites More sharing options...
Baldurien Posted April 20, 2006 Share Posted April 20, 2006 Je dirais la doc ? (je connais pas DB2, et le SQL standards n'apporte aucune solution de ce côté je crois) Sinon, la solution (barbare) que fait le SGBD de toute manière : tu prend tous les résultats, puis tu te limite aux dix premiers (si y en a autant), en libérant les ressources. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.