473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

MySQL equivalent to *nix 'more'

How do I prevent the MySQL client to scroll pages when the results of
a query exceeds the number of lines in the terminal window?

Like a MySQL equivalent to *nix 'more'.

mysql> select foo from bar;
[...]

2500 rows in set (0.00 sec)
--

Jul 23 '05 #1
2 2223
"Gnurp Gnarp" <gn*************@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
How do I prevent the MySQL client to scroll pages when the results of
a query exceeds the number of lines in the terminal window?

Like a MySQL equivalent to *nix 'more'.

mysql> select foo from bar;
[...]


Read up on LIMIT.

You can pass it a number of rows to skip over as well as the number of rows
to retrieve.
This allows you to paginate through large tables 50 (or whatever) records at
a time.

Thomas Bartkus
Jul 23 '05 #2
You can use the pager command '\P' to set the paging program:

MySQL>\P more

will use the OS's 'more' command to page the output.
Regards,

Mike Argy
Custom Office Solutions
and UNIX/Windows applications

On Thu, 27 Jan 2005 06:45:02 -0800, Gnurp Gnarp wrote:
How do I prevent the MySQL client to scroll pages when the results of
a query exceeds the number of lines in the terminal window?

Like a MySQL equivalent to *nix 'more'.

mysql> select foo from bar;
[...]

2500 rows in set (0.00 sec)
--


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jon Miller | last post by:
We've run out of disk space and would like to move either the entire MySQL = system or if possible move the databases. Can this be done without any = difficulties? Thanks Jon L. Miller,...
175
by: Sai Hertz And Control Systems | last post by:
Dear all, Their was a huge rore about MySQL recently for something in java functions now theirs one more http://www.mysql.com/doc/en/News-5.0.x.html Does this concern anyone. What I...
4
by: groleo | last post by:
Hi. I'm trying to port a piece of code, written for win32, that uses the finddata_t structure. Is there an equivalent , or a work-around, that implement finddata_t on *nix platforms?
10
by: perspolis | last post by:
Hi I want to connect to a mysql database on my site for example www.xyz.com what settings is needed to connect to that by oledataadabter? thx
14
by: dottty | last post by:
Hi, i have a table that has the following fields: id, name, dept, pay 1, John, Sales, 4000 2, Peter, HR, 5000 etc. How do i count how many people there are in each dept with an sql query? ...
1
by: Jason Wilson | last post by:
I've been tasked by my boss with configuring a MySQL install that we host for one our partners to support SSL using a commercial certificate. MySQL is installed on Windows 2000 Server. 1st: I...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
14
by: luvtopost | last post by:
I am trying to learn PHP and was reading the book by Laura Welling and Luke Thompson. Obviously, PHP is already installed on a server when hosted by an ISP already. Is there a way to just download...
9
by: PI | last post by:
Hi Guys, I need some assistance with the following scenario please. I know this might be more of a MySQL post than a PHP one, but it is likely some developer has been here before and would be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.