
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do I show a MySQL warning that just happened?
To show a MySQL warning, you can use the below syntax −
SHOW WARNINGS;
The above syntax only displays the immediate warning from MySQL prompt. Suppose you run another query between them or you have lost the MySQL connection, then SHOW WARNINGS will not work.
Here is the query to display warnings −
mysql> SHOW WARNINGS;
Here is the output that displays immediate warning −
+-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Error | 1064 | You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'QUERY CACHE' at line 1 | +-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
- Related Questions & Answers
- How do I fix the deprecation warning that comes with pylab.pause?
- How do I show unique constraints of a table in MySQL?
- How do I show the schema of a table in a MySQL database?
- How do you just show the text label in a plot legend in Matplotlib?
- How do i match just spaces and newlines with Python regex?
- How do I kill all the processes in MySQL “show processlist”?
- How do I remove a MySQL database?
- How do I select data that does not have a null record in MySQL?
- How do I create a view in MySQL?
- How do I use `SHOW COLUMNS` as a valid data source for a table?
- How do I hide and show a menu item in the Android ActionBar?
- How do I alter a MySQL table column defaults?
- How do I insert a NULL value in MySQL?
- How do I exclude a specific record in MySQL?
- How do I drop a primary key in MySQL?
Advertisements