We have used them time and again but never got the chance to talk about them. Thus today we will discuss collection methods.

What are Collection Methods?

Collection methods are PL/SQL’s in-built functions and procedures which can be used in conjunction with collections.

So, what they can do for you?

Using PL/SQL collection method you can get the information as well as alter the content of the collection.

How many collection methods do we have?

In Oracle Database we have 3 Collection Procedures and 7 Collection functions. In total we have 10 collection methods. Here are their names —

Collection Functions

  • Count
  • Exists
  • First, Last
  • Limit
  • Prior, Next

Collection Procedures

  • Delete
  • Extend
  • Trim

Since the syntax for using the collection built-ins is different from the normal syntax used to call procedures and functions therefore they are referred to as methods.

How do we use collection methods?

In Oracle PL/SQL, collection methods can be used using Dot (.) notation. Let’s take a look at the syntax.

Collection. Method (parameters) 

That is the quick introduction to collection methods in Oracle Database. In the upcoming videos we will explore in detail each of the above mentioned methods individually.

Thanks and have a nice day!