How does nc_order work?

How does the field nc_order work? Specifically for sorting, is there a way I explicitly use this field?

I only see this field in the Relations view of the Details tab in our self-hosted NocoDB dashboard, but nowhere else. If this field represents the order of the rows in your spreadsheet, then it’s valuable to us, because we have a case where our editors would like to sort frontends rendered from the API calls made to NocoDB by the order of the rows in the dashboard. But I can’t seem to expose this field using the fields query param on our API requests, so I don’t know if it’s actually doing anything when I try to sort by it (also using query params). On a sidenote, the type for the field in that Relations screen I mentioned appears to be string, which is a bit surprising. I would assume it’d be number/integer.

Point is, without this, we’ve resorted to a custom “order” field that requires editors to painstakingly enter numbers for each row, which is error-prone and cumbersome. So I was just wondering if nc_order might provide a solution for us, but I oddly can’t find any documentation anywhere on it.

Short answer:
You’ve identified a real internal mechanism. It represents row order, is stored as a decimal (not a string), and is already used as the default sort in list responses. However, it’s intentionally hidden from the public API, so you can’t reference or sort by it directly.


nc_order is a system column added to every table. Internally, it’s a high-precision numeric field (NUMERIC(40,20)), even though the UI may sometimes show it as a string — that’s just a display issue.

It’s used to power drag-and-drop reordering in the grid. When a row is moved, the backend assigns it a value between its neighbors (roughly (prev + next) / 2). The high precision allows this without needing to renumber rows.


What’s useful here:
If your API call doesn’t include a sort parameter, records are already returned in nc_order. So if users reorder rows in the UI, your API will reflect that order by default. It’s worth checking if you can drop your custom order field.


Why you can’t use it directly:
nc_order is treated as an internal column. It’s not returned in fields and can’t be used in sort parameters. This is by design.


What this means for you:

  • No sort in API → you’re likely already getting the UI order

  • Need explicit sorting → continue using your own numeric field

  • Otherwise → you can rely on UI order, as long as your frontend doesn’t override it


This behaviour isn’t documented because it’s not a public contract, even though it’s stable in practice.

If your API call doesn’t include a sort parameter, records are already returned in nc_order. So if users reorder rows in the UI, your API will reflect that order by default.

That’s what I was hoping it was! A custom field for explicit ordering can be useful, but it’s also tedious for our editors to maintain it. So a reliable sorting of the records based on the dashboard order is perfect for us. Thank you for taking the time to explain so clearly!