# Sorting Records

> Part of the NocoDB documentation (Product docs > Tables > Table Operations > Work with Data). Index of all pages: https://nocodb.com/llms.txt. Any docs page is available as Markdown by adding `.md` to its URL.

URL: https://nocodb.com/docs/product/tables/table-operations/sort
Last updated: 2026-10-03

Sort records in a NocoDB view by one or more fields, in ascending or descending order.

<img alt="Sorting records" src={__img0} placeholder="blur" />

Sorting arranges your data in order:

| Field type       | Sort order                       |
| ---------------- | -------------------------------- |
| Text based types | Alphabetical, (A → Z) or (Z → A) |
| Numerical types  | Ascending or descending          |

NocoDB supports nested sorting. You select the fields and the order in which NocoDB applies them.

<AskNocoAI>
  <Prompt>
    Sort this view by [Due Date], earliest first
  </Prompt>

  <Prompt>
    Sort this view by [Priority], then by [Created] with the newest first
  </Prompt>

  <Prompt>
    Remove all sorts from this view
  </Prompt>
</AskNocoAI>

### Add or edit sort

1. In the toolbar menu, click `Sort`.
2. Select the `Field` to sort by.
3. Set the sort `Direction`: ascending or descending.
4. To sort by more fields, use `+ Add Sort Option`.

<img alt="Sort Field" src={__img1} placeholder="blur" />

<Callout type="info">
  The field listed at the top is used for 

  **primary sorting**

  , followed by other fields in 

  **top-down order**

   for secondary and tertiary sorting.
</Callout>

### Enable or disable a sort condition ☁

<Callout type="info">
  This feature is available on 

  **NocoDB Cloud**

   and licensed self-hosted deployments.
</Callout>

Each sort condition row has a checkbox. Use it to turn the condition off or on without deleting it. Disable a condition to remove it from the sort for a time. Enable it again later to restore the same configuration. In the example below, the `Country` sort is disabled, and `Segment` and `Product` stay active.

<img alt="Toggle and reorder sort conditions" src={__img2} placeholder="blur" />

### Reorder sort conditions ☁

<Callout type="info">
  This feature is available on 

  **NocoDB Cloud**

   and licensed self-hosted deployments.
</Callout>

Each sort condition row has a drag handle (the dotted icon next to each row in the image above). Drag a row up or down to change the priority of your sort conditions. NocoDB applies the topmost condition as the primary sort.

### Delete sort

1. In the toolbar, click `Sort`.
2. Click the trash / bin icon to the right of the sort to delete.

<img alt="Delete Sorting" src={__img3} placeholder="blur" />

---

## Related pages

- [Hide & Reorder Fields](https://nocodb.com/docs/product/tables/table-operations/field-operations.md): Hide, show and reorder fields in a NocoDB view from the Fields menu in the toolbar.
- [Filtering Records](https://nocodb.com/docs/product/tables/table-operations/filter.md): Filter records in a NocoDB view with conditions, filter groups, toggle filters and pinned filters.
- [Grouping Records](https://nocodb.com/docs/product/tables/table-operations/group-by.md): Group records in a NocoDB view by up to three levels of fields, with group aggregations.
- [Colouring Records](https://nocodb.com/docs/product/tables/table-operations/record-colouring.md): Color records and individual fields in NocoDB views, based on a single select field or on conditions.
- [Record Height](https://nocodb.com/docs/product/tables/table-operations/row-height.md): Set the record height in a NocoDB grid to Short, Medium, Tall or Extra.
- [Freeze Fields](https://nocodb.com/docs/product/tables/table-operations/freeze-fields.md): Freeze up to three fields in a NocoDB Grid view so they stay in place when you scroll horizontally.
- [Search](https://nocodb.com/docs/product/tables/table-operations/search.md): Search for records in a NocoDB table, in one field or in all fields, from the toolbar.
- [Realtime Presence](https://nocodb.com/docs/product/tables/table-operations/realtime-presence.md): See live in NocoDB who else works in a table, with a color marker for each collaborator in the grid.
