Oracle 5.0 Reference Manual page 300

Table of Contents

Advertisement

4.5.1.6.
Tips
mysql
This section describes some techniques that can help you use
4.5.1.6.1. Input-Line Editing
supports input-line editing, which enables you to modify the current input line in place or recall
mysql
previous input lines. For example, the left-arrow and right-arrow keys move horizontally within the
current input line, and the up-arror and down-arrow keys move up and down through the set of
previously entered lines. Backspace deletes the character before the cursor and typing new characters
enters them at the cursor position. To enter the line, press Enter.
On Windows, the editing key sequences are the same as supported for command editing in console
windows. On Unix, the key sequences depend on the input library used to build
the
libedit
Documentation for the
sequences permitted by a given input library, define key bindings in the library startup file. This is a file
in your home directory:
For example, in libedit, Control+W deletes everything before the current cursor position and
Control+U deletes the entire line. In readline, Control+W deletes the word before the cursor and
Control+U deletes everything before the current cursor position. If
user who prefers the
file (creating the file if necessary):
bind "^W" ed-delete-prev-word
bind "^U" vi-kill-line-prev
To see the current set of key bindings, temporarily put a line that says only
.editrc.
mysql
4.5.1.6.2. Displaying Query Results Vertically
Some query results are much more readable when displayed vertically, instead of in the usual
horizontal table format. Queries can be displayed vertically by terminating the query with \G instead of
a semicolon. For example, longer text values that include newlines often are much easier to read with
vertical output:
mysql>
SELECT * FROM mails WHERE LENGTH(txt) < 300 LIMIT 300,1\G
*************************** 1. row ***************************
msg_nro: 3068
date: 2000-03-01 23:29:50
time_zone: +0200
mail_from: Monty
reply: monty@no.spam.com
mail_to: "Thimble Smith" <tim@no.spam.com>
sbj: UTF-8
txt: >>>>> "Thimble" == Thimble Smith writes:
Thimble> Hi.
Thimble> with UTF-8 or Unicode? Otherwise, I'll put this on my
Thimble> TODO list and see what happens.
Yes, please do that.
Regards,
Monty
file: inbox-jani-1
hash: 190402944
1 row in set (0.09 sec)
4.5.1.6.3. Using the
— The MySQL Command-Line Tool
mysql
or
library).
readline
and
libedit
for
.editrc
behavior for these two keys can put the following lines in the
readline
will show the bindings when it starts.
I think this is a good idea.
[269]
--safe-updates
libraries is available online. To change the set of key
readline
and
libedit
.inputrc
Is anyone familiar
Option
280
more effectively.
mysql
mysql
for readline.
was built using libedit, a
mysql
at the end of
bind
(for example,
.editrc

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents