在XQuery中,您如何通过升序和降序进行排序?
我从教程中得到以下内容:
for $x in doc("books.xml")/bookstore/book
where $x/price>30
order by $x/title
return $x/title
Run Code Online (Sandbox Code Playgroud)
可不可能是
for $x in doc("books.xml")/bookstore/book
where $x/price>30
order by $x/title ascending
return $x/title
Run Code Online (Sandbox Code Playgroud)
Luc*_*ero 14
是的,您可以使用ascending
(默认)或descending
在order by..
表达式的末尾.
这是W3C XQuery规范相关部分的链接:
http://www.w3.org/TR/xquery/#doc-xquery-OrderSpec
归档时间: |
|
查看次数: |
36373 次 |
最近记录: |