USE [Database]

IF OBJECT_ID('[Procedures].[delete_product]', 'P') IS NOT NULL
  DROP PROCEDURE [Procedures].[delete_product];
GO
CREATE PROCEDURE [Procedures].[delete_product]
  @product_id AS INT
AS
  BEGIN TRANSACTION;
  DELETE FROM [Tables].[product_values]
  WHERE [product_id] = @product_id;
  DELETE FROM [Tables].[product_attributes]
  WHERE [product_id] = @product_id;
  DELETE FROM [Tables].[products]
  WHERE [id] = @product_id;
  COMMIT TRANSACTION;
GO