By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
7 rows affected
Msg 4712 Level 16 State 1 Line 2
Cannot truncate table 'dbo.TestTable1' because it is being referenced by a FOREIGN KEY constraint.
7 rows affected
Msg 4712 Level 16 State 1 Line 2
Cannot truncate table 'dbo.TestTable1' because it is being referenced by a FOREIGN KEY constraint.