N1QL - Select All documents with startkey



Hi. I want to know if there option to write select query for get all documents with startkey = "XXX_'
For example, if I have 10000+ documents with key - “User_X” where X is user ID
So If I want Get All users, how I can to do that with N1QL


I don’t know about the .Net part but Yeah in N1QL you can use its LIKE operation:
for example the Query would be like

SELECT * FROM `user` WHERE META(`user`).id LIKE 'USER_%'

Where user is the bucket name, and execute this query like any other query.


Thank you. It was very helpful