how to trauncate table with foreign key
Dec 22, 2023
how to truncate table with foriegn key in mssql
step1.
trauncate table [your table name]
it may rise can’t delete data due to foreign key constraints
step2.
alert table [error message’s foreign key constraints table name] nocheck constraint all
delete [you want to delete data table name]
alert table [error message’s foreign key constraints table name] check constraint all