XMLDB auto increment?

XMLDB auto increment?

by Deleted user -
Number of replies: 1
Hello,

Can anyone tell me for the xmldb how do I make a field auto increment? At the moment I have this,

<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="course"/>



Thanks

~ Kcg
Average of ratings: -
In reply to Deleted user

Re: XMLDB auto increment?

by Subodh Iyengar -
If you want to make it auto-increment define id as the primary key in the keys section. The XMLDB marks all primary keys as auto-increment.
add
KEY NAME="primary" TYPE="primary" FIELDS="id"
in the keys section