From the course: Complete Guide to Advanced SQL Server

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Ledger tables and ledger databases

Ledger tables and ledger databases - SQL Server Tutorial

From the course: Complete Guide to Advanced SQL Server

Ledger tables and ledger databases

There are a couple of ways to enable ledger in your SQL Server databases. The first is to add ledger tables to your existing database, assuming it's compatible with SQL Server 2022 or higher. Ledger tables come in two different varieties. Updatable ledger tables allow users to insert, update, and delete rows in the table. Append-only ledger tables, on the other hand, only allow new rows of data to be added to the table. They will block all attempts to update existing data or to delete rows from the table for all users, even when those operations are attempted by system administrators. Other than these new designations, the ledger tables will operate just like every other table that you've ever worked with in SQL Server. You include named columns, set data types, and create primary and foreign key relationships as needed for the data that you want to store. When users add and update rows of data in a ledger table, those transactions are permanently recorded in the blockchain ledger. In…

Contents