I want to create a document in azure documentdb with an auto-increment column.
Is this possible? If yes, please guide me.
Any help would be greatly appreciat
DocumentDB doesn't include auto-increment functionality out of the box.
As Gaurav mentioned in Do we have Identity Column in DocumentDB, the id
field is special in that if a value isn't provided by the application - DocumentDB will assign a GUID automatically.
If you need the auto-increment functionality, one potential solution would be to store a counter as a document and leverage DocumentDB's triggers to populate your field and update the counter.