PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > mailing.database.mysql > limiting amount of returned rows?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
limiting amount of returned rows?

Réponse
 
LinkBack Outils de la discussion
Vieux 27/03/2006, 15h40   #1
Sonnich
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut limiting amount of returned rows?

Hi!

How do I limit the amount of returned rows?

Lets say, that I want only the latest 400 rows (of e.g. 4034634 rows) -
is there a parameter for that like rownum in Oracle?

e.g. select * from someplace where rownum < 400 order by sometimefield?

BR
Sonnich

  Réponse avec citation
Vieux 27/03/2006, 18h48   #2
Bill Karwin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: limiting amount of returned rows?

"Sonnich" <sonnich.jensen@elektrobit.com> wrote in message
news:1143474015.916066.15640@z34g2000cwc.googlegro ups.com...
> How do I limit the amount of returned rows?


The optional LIMIT clause of queries can do this.

Read about it on this page:
http://dev.mysql.com/doc/refman/5.0/en/select.html

Starting at the bullet item that begins, " The LIMIT clause can be used to
constrain the number of rows returned..."

Regards,
Bill K.


  Réponse avec citation
Vieux 27/03/2006, 19h12   #3
noone
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: limiting amount of returned rows?

Sonnich wrote:

> Hi!


> How do I limit the amount of returned rows?


> Lets say, that I want only the latest 400 rows (of e.g. 4034634 rows) -
> is there a parameter for that like rownum in Oracle?


> e.g. select * from someplace where rownum < 400 order by sometimefield?


> BR
> Sonnich



http://dev.mysql.com/doc/refman/4.1/...imization.html

select * from someplace where order by sometimefield limit 400;



  Réponse avec citation
Vieux 28/03/2006, 12h28   #4
Sonnich
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: limiting amount of returned rows?


Bill Karwin wrote:
> "Sonnich" <sonnich.jensen@elektrobit.com> wrote in message
> news:1143474015.916066.15640@z34g2000cwc.googlegro ups.com...
> > How do I limit the amount of returned rows?

>
> The optional LIMIT clause of queries can do this.
>
> Read about it on this page:
> http://dev.mysql.com/doc/refman/5.0/en/select.html
>
> Starting at the bullet item that begins, " The LIMIT clause can be used to
> constrain the number of rows returned..."


Thanks, that works well.

Sonnich

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h41.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08202 seconds with 12 queries