Change the line CREATE PROCEDURE PRO_INSERT DECLARE
to CREATE PROCEDURE PRO_INSERT AS
. Then declare each variable, like this:
USE P_DETAIL
CREATE PROCEDURE PRO_INSERT
AS
DECLARE
... --List of variables and procedure code
One more thing - you need to remove the comma after @SV_ID INT,
since that is the last parameter in your input parameters list.
Check out this sample Fiddle to see where your code is going wrong.