473,789 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2241
"Gnurp Gnarp" <gn************ *@hotmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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
1933
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, MCNE, CNS Director/Sr Systems Consultant MMT Networks Pty Ltd http://www.mmtnetworks.com.au
175
11517
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 think is PostgreSQL would have less USP's (Uniqe Selling Points
4
2233
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
1399
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
6600
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? I find this surprisingly difficult, given the fact that i can sum the total
1
11211
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 know nothing about MySQL. 2nd: What little documentation I was able to find was very cryptic and seems written for LINUX. 3rd: I have found reference to the fact that MySQL needs to be recompiled to support SSL. I have been told that this has...
110
10630
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 case scenario for MyISAM backend? Also is it possible to not to lose data but get them corrupted?
14
4477
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 PHP 5 onto my laptop as well as MYSQL and practice learning it with coding and scripts, etc.? I don't have another machine to install Apache or IIS. Thanks.
9
5498
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 able to help out. I have some serialized data that I would like to store in a MySQL database. When viewed, the serialized data looks like this: O:4:\"cart\":4:{s:15:\"\0cart\0c_cart_id\";N;s:18:\"\0cart
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.