Jun 08, 2021 2:29 pm
Write a program to display the information of the product for
the given product id?
1 Reply
Jun 09, 2021 5:48 am
PLSQL procedure to display the product information for the given product id.
declare vprodid prod_dtls.prod_code%type; p_rec prod_dtls%rowtype; begin vprodid:='&vrodpid'; select * into p_rec from prod_dtls where prod_code=vprodid; dbms_output.put_line (' Information of prodid: '||vprodid); dbms_output.put_line (chr(10)||'prod name: '||p_rec.prod_name||' '|| 'Price: '||p_rec.cost||' '|| 'Mfg date: '||p_rec.mfg||' '|| 'Warrenty: '||p_rec.warrenty||' '|| 'company code: '||p_rec.comp_code); end;