PL/SQL Program For Trim Method Of PL/SQL Table

Q. Write PL/SQL Program For Trim Method Of PL/SQL Table.

Output:

DECLARE
	TYPE my_frnds IS TABLE OF VARCHAR2(100) ;
	names my_frnds;
Begin
	names :=my_frnds('ALLEN','SMITH','JOHN','LAKE','KING');
	For i IN names.FIRST..names.LAST LOOP
		DBMS_OUTPUT.PUT_LINE('My Friend Names Is '||names(i));
	END LOOP;
	DBMS_OUTPUT.PUT_LINE('Delete The Last Name !');
	names.TRIM ;
	FOR i IN names.FIRST..names.LAST LOOP
		DBMS_OUTPUT.PUT_LINE('My Friend Names Is '||names(i) );
	END LOOP;
End;
/

My Friend Names Is ALLEN

My Friend Names Is SMITH

My Friend Names Is JOHN

My Friend Names Is LAKE

My Friend Names Is KING

Delete The Last Name !

My Friend Names Is ALLEN

My Friend Names Is SMITH

My Friend Names Is JOHN

My Friend Names Is LAKE

PL/SQL procedure successfully completed.

Compatibility (Tested on):

Oracle Database 10g Express Edition Release 10.2.0.1.0 – Product

Download Now (.Zip File – 2KB)…

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.