The COUNT method returns the number of elements currently held by a collection.
DECLARE
TYPE NbrLst IS TABLE OF INTEGER;
n NbrLst := NbrLst (1,2,3,4,5);
BEGIN
DBMS_OUTPUT.PUT_LINE(’There are ‘ || n.COUNT || ‘ elements.’);
n.DELETE(4); — fourth element is deleted
DBMS_OUTPUT.PUT_LINE(’Now, there are ‘ || n.COUNT || ‘ elements.’);
END;
/
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
