7

I have many documents in a bucket as

{ prop1: value, prop2: value, prop3: value}

But some documents do not have the prop3 field.

How can I retrieve all documents that DO NOT have the prop3 field, using an n1ql query?

Srirag Nair
  • 166
  • 1
  • 8

1 Answers1

19

The IS MISSING keyword is your friend here:

SELECT * FROM bucket WHERE prop3 IS MISSING;
Simon Baslé
  • 27,105
  • 5
  • 69
  • 70