In pl-sql can I assign the SUM value to a variable?

0

In the system you have a% variable of% that should receive the total value of the sum of the Values column.

How can I assign the sum value vsoma ?

    
asked by anonymous 24.01.2018 / 14:10

1 answer

2

Use the INTO clause:

Example:

SELECT sum(COLUNA) INTO VARIAVEL from TABELA

The result of the sum will be assigned in the variable you declared.

More information:

24.01.2018 / 14:20