CREATE TABLE ... WITH (LEDGER = ON)
makes the table tamper-evident with generated ledger columns
What changes
- Input
- table definition
- Output or change
- updatable or append-only ledger table plus its history table and ledger view
Syntax at a glance
WITH ( LEDGER = ON [ ( <ledger_option> [ ,...n ] ) ] | OFF )
Work example
A SQL Server 2022 or later table needs tamper-evident ledger tracking.
Review ledger type, digest storage, retention, and external verification ownership before creating the table.
Check your work The ledger metadata identifies the table and a lab digest verifies against the saved history.
Open Microsoft Learn for full syntax, permissions, and details for your version.