Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen Page Command

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
When using DESCRIBE and HELP etc. in the MySQL command line, the screen scrolls through to the end of the article. How do I pause the screen at the end of each page?
Similar to the DOS switch /P or <more>.
Thanks

Keith
 
You can use the argument --pager[=progname] when starting the mysql client program, or use the command "pager [progname]" within the program. However, this doesn't work under Windows, and I don't know of any other way to page query results in Windows.

A few alternatives which might be useful:
- Set the command-window screen buffer to a useful size, so that you can scroll back to see earlier output. (Right-click the window's title bar, click Properties, click Layout, enter a higher value (maybe 1000) in Screen Buffer Size / Height).
- Use a GUI client program instead. MySQL Query Browser and MySQL Administrator ar available free from the MySQL website.
 
Those files correspond to ordinary MySQL tables, which can be queried the same as any other, including exporting to text files.

However, instead of relying on trying to read those files, you would most likely be better off consulting the MySQL manual. You can search and read the HTML version at the MySQL site, or download the PDF version.
 
Thanks for that.
A you can probably tell, I am new to MySQL but I am learning fast. I am having a few probs but that's down to unfamiliarity.
I am working on DATE and DATETIME at the moment, any advice, pitfalls or good resources you could suggest. I keep referring back to the MySQL site and learn something new on each visit.

Keith
 
There's nothing complicated about DATE and DATETIME. DATE expects you to provide values in the form "yyyy-mm-dd" (or "yyyymmdd" or yyyymmdd) and that's the format it uses when it returns DATE values to you. DATETIME is similar except it uses the format "yyyy-mm-dd hh:mm:ss".

The MySQL manual explains all that. If you find the manual heavy going, you could try one of the many books on MySQL, for example "MySQL" (3rd edition) by P. DuBois.
 
The format isn't a problem but I don't want to spend hours formatting my output only to discover a simple function which does the work for me. I can feel a function coming on, surely there is one already?

Keith
 
I don't know what you mean there, but it seems to be a programming matter, a change of subject, requiring a new thread.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top