List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:August 29 1999 12:42am
Subject:Re: I'm new!
View as plain text  
On Fri, 1999-08-27 22:55:34 -0400, Van Boersma wrote:
[...]
> > I have a big table with 65000 records and when I make a selection with some
> > of them ( 150 - 200 ) this records 'run' on my screen . How can I see that
> > information page by page ( something 'more' or anything else )
[...]
> mysql -hthehost -p thedatabase -e 'select * from thetable;' | more

Another option is to use the (MySQL specific) SQL clause "LIMIT".

Quoting the MySQL manual, chapter "7.11 SELECT syntax":
| The LIMIT clause can be used to constrain the number of rows
| returned by the SELECT statement. LIMIT takes one or two numeric
| arguments. If two arguments are given, the first specifies the
| offset of the first row to return, the second specifies the maximum
| number of rows to return. The offset of the initial row is 0 (not 1).
| 
| mysql> select * from table LIMIT 5,10;  # Retrieve rows 6-15
| 
| If one argument is given, it indicates the maximum number of rows to
| return.
| 
| mysql> select * from table LIMIT 5;     # Retrieve first 5 rows
| 
| In other words, LIMIT n is equivalent to LIMIT 0,n.

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
I'm new!grig28 Aug
  • Re: I'm new!Van28 Aug
    • Re: I'm new!Martin Ramsch29 Aug