MinKey and MaxKey values
- Last Updated: July 30, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- MongoDB 8.0
- Documentation
The driver supports the MinKey and Maxkey special values and, by default, maps
them to the
VARCHAR ODBC data type during relational
mapping. Note that MinKey and MaxKey values are static and return the same data whenever
they are queried. The following are the respective values returned by the driver: - MinKey:
{“$MinKey”:1} - MaxKey:
{“$MaxKey”:1}
MinKey and MaxKey are special values used internally by MongoDB that do not have a counterpart in SQL. Therefore, they cannot be used in Where clauses for comparisons.