Forum

Write a PLSQL Progr...
 
Share:
Notifications
Clear all

Write a PLSQL Program to Display Product Information for the Given Product ID


Posts: 4
Topic starter
(@testuser)
New Member
Joined: 3 years ago

Write a program to display the information of the product for
the given product id?

1 Reply
Posts: 27
Admin
(@vinodkrsetty)
Eminent Member
Joined: 5 years ago

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;
Reply

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: