Select specific columns from SHOW ERRORS query

Viewed 1288

There are 3 columns (Level, Code, Message) in the output when SHOW ERRORS is executed. Is there any way to select one specific column (lets say, Message) instead of all three.

The main purpose is to get the error message (3rd column) in a variable for further processing.

Edited:

The result of the query SHOW ERRORS after a erroneous select query SELECT anything is like that:

    +-------+------+-------------------------------------------+
    | Level | Code | Message                                   |
    +-------+------+-------------------------------------------+
    | Error | 1054 | Unknown column 'anything' in 'field list' |
    +-------+------+-------------------------------------------+
1 Answers
Related