Introduction to PL/SQL Collection Methods

By Manish Sharma

Collection Methods

Introduction to PL/SQL Collection Methods in oracle database by Manish Sharma

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

  1. Count
  2. Exists
  3. First
  4. Last
  5. Limit
  6. Prior
  7. Next

Collection Procedures

  1. Delete
  2. Extend
  3. 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!

SQL Script and Presentation used

You can DOWNLOAD SQL script and presentation used in the Video and in this article.

NO SQL Script used in Video and in this article

How do you like this blog? Is there anything you want us to improve? Tell us, what you feel on our Facebook page and on our Twitter .

  • Manish Sharma Oracle Rebellion Rider
  • Manish Sharma Oracle certified SQL expert
  • Manish Sharma oracle certified associate
  • Manish Sharma oracle certified professional
  • View Manish Sharma's profile on LinkedIn

         View Manish Sharma's profile on LinkedIn