Auto increment with XQuery Update?
问题 Does XQuery Update support auto increment attributes, just like auto increment fields in SQL ? I'm using BaseX as my database. 回答1: Given an answer from Christian Grün on the BaseX mailing list, this is doable when the node one is adding is defined in the XQuery Update statement, and hence can be enhanced using an {enclosed expression} before inserting it: You might specify the attribute counter within your XML file/database and increment it every time when you insert an element. A simple