I would like to drop a table with foreign key constraint and re-create the same table (with all the relationships) and with additional data (which I have from “Generate Scripts…”)
How can I do it? I'm using an Azure SQL Server.
If I disable the constraint, truncate the table, insert new data, and re-enable it? Will this work?
Any leads, please? Thanks.
One of the ways is to create a
.sqlproj. Inside this, you can create the tables, stored procedures, indexes, data population, and much more. The deployment from.sqlprojwill take care of any changes you do to the data store. Please refer to the links below.URL: https://learn.microsoft.com/en-us/azure/devops/pipelines/targets/azure-sqldb?view=azure-devops&tabs=yaml
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver15