8
在XQuery中,您如何按升序和降序进行排序?XQuery按升序和降序排序
我已得到教程如下:
for $x in doc("books.xml")/bookstore/book
where $x/price>30
order by $x/title
return $x/title
会是
for $x in doc("books.xml")/bookstore/book
where $x/price>30
order by $x/title ascending
return $x/title
所以它会在befor DOC $ X(把 “books.xml”)/书店/本书 其中$ X /价格> 30 顺序通过升$ X /标题 回报$ X /标题 – 2011-05-14 11:04:50
或者这将是$ x in doc(“books.xml”)/ bookstore/book其中$ x/price> 30 order by $ x/title返回$ x/title升序 – 2011-05-14 11:16:02
我写了“after the expression”,我的意思是这样的:'' ...按$ x/title升序排列......(就像你在你的问题中写的那样,这是正确的语法)。 – Lucero 2011-05-14 11:23:07