USE [Database] IF OBJECT_ID('[Tables].[product_write_off_records]', 'U') IS NOT NULL DELETE [Tables].[product_write_off_records]; IF OBJECT_ID('[Tables].[additional_variables]', 'U') IS NOT NULL DELETE [Tables].[additional_variables]; IF OBJECT_ID('[Tables].[price_history_records]', 'U') IS NOT NULL DELETE [Tables].[price_history_records]; IF OBJECT_ID('[Tables].[product_outflow_records]', 'U') IS NOT NULL DELETE [Tables].[product_outflow_records]; IF OBJECT_ID('[Tables].[product_inflow_records]', 'U') IS NOT NULL DELETE [Tables].[product_inflow_records]; IF OBJECT_ID('[Tables].[write_off_reasons]', 'U') IS NOT NULL DELETE [Tables].[write_off_reasons]; IF OBJECT_ID('[Tables].[product_values]', 'U') IS NOT NULL DELETE [Tables].[product_values]; IF OBJECT_ID('[Tables].[product_attributes]', 'U') IS NOT NULL DELETE [Tables].[product_attributes]; IF OBJECT_ID('[Tables].[attributes]', 'U') IS NOT NULL DELETE [Tables].[attributes]; IF OBJECT_ID('[Tables].[suppliers]', 'U') IS NOT NULL DELETE [Tables].[suppliers]; IF OBJECT_ID('[Tables].[products]', 'U') IS NOT NULL DELETE [Tables].[products]; IF OBJECT_ID('[Tables].[product_types]', 'U') IS NOT NULL DELETE [Tables].[product_types];