I create a procedure to update table
but when I execute to test the procedure with


PRINT :g_name_pd

show nothing as been change ..
Can you guy's help where I m doing wrong
Thanks
Agaba

CREATE OR REPLACE PROCEDURE update_name_pd
(p_name  IN  bb_product.productname%TYPE,
p_id   OUT  bb_product.idproduct%TYPE )

IS

BEGIN
  UPDATE bb_product
  SET  productname = p_name
  WHERE idProduct = p_id ;
COMMIT;
END;



VARIABLE g_name_pd VARCHAR2(45)


BEGIN
 :g_name_pd := 'CopressorBar #388';
END;


EXECUTE update_name_pd (1,:g_name_pd)
Member Avatar for hfx642

For starters...
1. Try reversing the order of the parameters in your procedure call.
2. BOTH of your parameters should be IN parameters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.