Skip to content
Advertisement

Select several rows into several variables – Oracle PL/SQL

I have one select statement that returns a query like this:

I have 4 variables

What is the cleanest way to assign those variables the values of my query? Can I use a SELECT INTO statement?

Advertisement

Answer

One method is:

This is an aggregation query that returns one row. If a particular row is missing, then the value will be NULL.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement