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.
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.
Correct Option: B The SHOW WARNINGS command is used after executing one of those statements to see the warning messages.
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.
Using the SHOW WARNINGS syntax
SHOW WARNINGS;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With