How to delete row from two table using stored procedure
alter PROCEDURE [dbo].[deleteproductdetail]
@Product_Id int
AS
BEGIN
delete from product where Product_Id=@Product_Id;
delete from size where Product_Id=@Product_Id;
END
error come
Msg 547, Level 16, State 0, Procedure deleteproductdetail, Line 8
The DELETE statement conflicted with the REFERENCE constraint "FK_tbl_Size_tbl_product". The conflict occurred in database "Dresswaladbnew", table "dbo.tbl_Size", column 'Product_Id'.
The statement has been terminated.
only one table data can delete