Why is there no **not equal** comparison in DynamoDB queries?
The KeyConditionExpression
doesn't allow not equals for the sort key. However, you can use the "Not Equals i.e. <>" in FilterExpression
.
KeyConditionExpression : 'category = :category', FilterExpression : 'tinponId <> :tinponIdVal',ExpressionAttributeValues : { ':category' : 'somevalue', ':tinponIdVal' : 'somevalue'}