How to read a value from a xml column in mysql?

Viewed 2420

Given:

mySql table with a column containing xml

Find:

sql query extracting a value

preferred Usage:

select ExtractValue(xmlColumn, 'xPath/to/value') from table;

Knowledge:

here first a xml element has to be set

set @xml
select ExtractValue(@xml, 'xPath/to/value);

how to set my xml column as @xml in one query ?

1 Answers
Related