> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lancedb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Changes since a version

> CHANGES: read the rows appended to a table since an earlier version.

**Applies to:** Embedded ❌, Enterprise ✅

`CHANGES` reads the rows appended to a table since an earlier
[version](https://docs.lancedb.com/management/table.md#versioning), without rescanning rows that were
already there:

```sql SQL icon="database" theme={"theme":{"light":"vitesse-light","dark":"catppuccin-mocha"}}
SELECT * FROM events CHANGES (INFORMATION => APPEND_ONLY) AT (VERSION => 42)
```

This returns the rows appended after version 42, up to the table's current
version at the time the query runs.

## Strictly append-only

The clause is named for what it requires, not just what it does: every
change to the table between the starting version and the current one must
be an append. If any of them inserted with changes other than a pure append
\-- an update, a delete, a merge -- the query is refused rather than silently
returning an incomplete or wrong result. Re-run it with a later starting
version that is itself after the non-append write, or read the table in full
instead of incrementally.

`INFORMATION => APPEND_ONLY` is the only supported value: it names what kind
of history the clause is willing to read, not a choice among several. `AT
(VERSION => ...)` takes a positive integer; there is no `AT (TIMESTAMP =>
...)` form for this clause, unlike other version qualifiers.

## Where the clause can go

It attaches to a table in `FROM`, including inside a subquery, a CTE, a join,
a set operation, or `EXPLAIN`:

```sql SQL icon="database" theme={"theme":{"light":"vitesse-light","dark":"catppuccin-mocha"}}
WITH recent AS (
  SELECT * FROM events CHANGES (INFORMATION => APPEND_ONLY) AT (VERSION => 42)
)
SELECT count(*) FROM recent

SELECT * FROM events CHANGES (INFORMATION => APPEND_ONLY) AT (VERSION => 10) a
JOIN events CHANGES (INFORMATION => APPEND_ONLY) AT (VERSION => 20) b
  ON a.id = b.id
```

Each occurrence of a table keeps its own starting version, even when the same
table is referenced more than once in one statement.

## Unsupported forms

| | |
| - | - |
| `CHANGES (INFORMATION => DEFAULT)` | only `APPEND_ONLY` is supported |
| `AT (TIMESTAMP => ...)` | only `AT (VERSION => ...)` is supported |
| `AT (VERSION => 0)` | the starting version must be positive |
| `... END (VERSION => ...)` | not supported; the current version is always the end |
| `CHANGES ... TABLESAMPLE (...)` | cannot be combined on the same table reference |

## What to read next

> [card] [Table](https://docs.lancedb.com/sql/ddl/table.md)
>
> CREATE, ALTER, CLONE and versioning basics.

> [card] [Select](https://docs.lancedb.com/sql/dql/select.md)
>
> The rest of the query grammar this clause attaches to.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.