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