I have to create a procedure to delete all products supplied by vendor x and all references in a another table called tab_line. Not sure if I'm doing it right, but it states that I'm missing an expression when I run this code. Any help or a better way to do this would be appreciated!
CREATE OR REPLACE PROCEDURE deleteproducts_test
(x in number)
AS
BEGIN
UPDATE tab_line
SET p_code = NULL WHERE v_code (SELECT v_code FROM tab_product
WHERE v_code = x);
DELETE FROM tab_product WHERE v_code = x;
END;
/