In XQuery we can compare the values with general comparisons and value comparisons.
1. General Comparisons : We perform general comparisons by using these symbols.
Ex. =, !=, <, <=, >, >=
2. Value Comparisons : We use below symbols to perform value comparisons.
Ex. ne, lt, le, eq, ge, gt.
Now, here is the way to use comparisons in XQuery.
$bookstore//book/@q > 100
If any q attributes have values which is greater than 100 expression will return true.
Asked In: Many Interviews |