I am storing xml in a column in a table as [XML Nullable] in DB2. The table has other columns also, most of them are String. Now I have to fetch the value of an element inside the stored XML.
For Example:
Suppose the table name is : REGEVENT Columns are: REFID (VARCHAR), APPID(VARCHAR), DATA(XML NULLABLE)
suppose I am storing following in DATA column.
<Employee>
<Name>huff</Name>
</Employee>
Now I have to get the value of Name from that XML. How to get that value.
I don't know if this can be done in 1 step. (Probably with a complicated query you can do this.)
But normally you should do this in 2 steps:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.