distinct
R2026bSyntax
Description
returns the unique values of the specified field from all documents in the MongoDB® collection.values = distinct(mongodbconn,collectname,field)
specifies additional options using one or more name-value arguments. For example, specify a
query string using values = distinct(mongodbconn,collectname,field,Query=mongoquery)mongoquery to filter documents before retrieving
distinct values. Use this syntax to retrieve distinct values from a subset of documents that
match specific criteria.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2026b
See Also
close | createCollection | dropCollection | insert | mongoc