SQL Flow Field Guide

TRUNCATE TABLE

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

deallocates data pages; identity resets to seed

What changes

Input
none
Output or change
all rows of a table (or listed partitions)

Syntax at a glance

TRUNCATE TABLE { database_name.schema_name.table_name | schema_name.table_name | table_name } [ WITH ( PARTITIONS ( { <partition_number_expression> | <range> } [ , ...n ] ) ) ] [ ; ]

Work example

A disposable table must be emptied as a whole and its identity counter reset as documented.

Do not run this in a shared database. Compare DELETE and TRUNCATE rules for foreign keys, triggers, permissions, and transaction handling first.

Check your work TRUNCATE TABLE. The change plan names the exact table and confirms no row-level trigger or dependent foreign key is expected to run.

Open Microsoft Learn for full syntax, permissions, and details for your version.