$gt¶
-
$gt¶ Syntax:
{field: {$gt: value} }$gtselects those documents where the value of thefieldis greater than (i.e.>) the specifiedvalue.Consider the following example:
This query will select all documents in the
inventorycollection where theqtyfield value is greater than20.Consider the following example which uses the
$gtoperator with a field from an embedded document:This
update()operation will set the value of thepricefield in the documents that contain the embedded documentcarrierwhosefeefield value is greater than2.