The MySQL client program

22 important questions on The MySQL client program

What is the default mysql statement terminator?

; (semicolon)

What is the prompt when entering the second line of a sql statement in the mysql client?

->

What 3 commands quit the mysql client?

\q, QUIT, EXIT
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What cli parameter executes a sql command in mysql client from the shell?

-e or --execute

What is the difference between the ; terminator and the \g terminator in mysql client?

None, no difference

What is the purpose of the \G terminator in mysql client?

Displays results in vertical style, one per line

What are the 6 prompts in the mysql client and there meaning?

mysql> waiting for new statement
-> Waiting for next line of statement
‘> Waiting for end of single-quoted string
“> Waiting for end of double-quoted string or identifier
`> Waiting for end of backtick-quoted identifier
/*> Waiting for end of C-style comment

Does the mysql client provide tab completion?

Yes

How do you execute a sql file from the mysql client prompt?

SOURCE <filename>; (filename without quotes)

What option of mysql client prevents the program from stopping when an error occurs  during execution?

-f or --force

What does the option --batch or -B do in mysql client?

Outputs data in tab-delimited format when in interactive mode

What does the option --table or -t do in mysql client?

Product tabular output format when in batch mode

What does the option -r or --raw do in mysql client?

Suppress the conversion of characters such as newline and carriage return to escape characters as \r or \n

What are the 2 extra output format next to tabular and tab-delimited in mysql client?

HTML                  --html or -H
XML                     --xml or -X

Name 3 commands in mysql client that are not MySQL commands?

QUIT, SOURCE and STATUS

What does the STATUS command do in mysql client?

Display information about the connection and the server itself

Are the long form commands case-sensitive in mysql client? And the short forms?

Long form: No
Short form: Yes

Are long form commands functional on multiline statements? and short form?

Long form: No
Short form: Yes

What option enables long form commands in multiline statements in mysql client?

--named-commands

What command clears the currently entered statement in mysql client?

\c or CLEAR

What does HELP contents; do in mysql client?

Display the top-most entries in the help-system

What does the --safe-updates option do in mysql client?

1. UPDATE and DELETE only allowed with WHEN or LIMIT
2. Output from a single SELECT is limited to 1000 rows
3. Multi-table SELECT queries are restricted to examining 1.000.000 rows for processing the query

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo