Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view the warning(s) after a SELECT query using the MySQL command line?

Tags:

mysql

How do I view the warning(s) after a SELECT query? The result of one query is:

Empty set, 1 warning (0.01 sec)

I am using MySQL via command line on Linux.

like image 533
An employee Avatar asked Oct 28 '09 19:10

An employee


People also ask

How can I see MySQL warnings?

In the mysql client, you can enable and disable automatic warnings display using the warnings and nowarning commands, respectively, or their shortcuts, \W and \w (see Section 4.5.

What is the command to see warning messages?

Correct Option: B The SHOW WARNINGS command is used after executing one of those statements to see the warning messages.

How could the error message be displayed again in MySQL?

The SHOW COUNT(*) ERRORS statement displays the number of errors. You can also retrieve this number from the error_count variable: SHOW COUNT(*) ERRORS; SELECT @@error_count; SHOW ERRORS and error_count apply only to errors, not warnings or notes.


1 Answers

Using the SHOW WARNINGS syntax

SHOW WARNINGS;
like image 123
Greg Avatar answered Oct 13 '22 00:10

Greg