> For the complete documentation index, see [llms.txt](https://fivesobes.gitbook.io/nexorm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivesobes.gitbook.io/nexorm/operators/update-operators/number-operators/usdmax.md).

# $max

Update records by setting the value of a numeric column to the maximum of its current value and a specified number. The $max method works similarly to Math.max(), which returns the largest of two values. It is used to ensure that the column’s value doesn’t fall below a given maximum threshold. For example, if the current value is less than the specified number, it will be updated to the specified number.

```typescript
await Member.$update({
    $where: { 
        age: { 
            $eq: 16 
        } 
    },
    $update: {
        $max: {
          age: 1
        }
    }
});
```
