Skip to content
Advertisement

How to print a variable in SQL stored procedure?

I want to print the a variable in the above code. But the code returns

How to fix this?

Advertisement

Answer

You can use an OUT variable

✓

✓

| answer |
| :----- |
| yes    |

db<>fiddle here*

Or simply don_’t use INTO or :=

| count(amount) |
| ------------: |
|             2 |

✓
| answer |
| :----- |
| yes    |

✓

db<>fiddle here

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