Scope of v_avg_salary
Hello,
Just to clarify:
We 'call' a user-defined function by using the SELECT statement, followed by the function name, then its input/s enclosed with a pair of parenthesis.
However, when you run the query SELECT v_avg_salary
in 3:10, the error code 1054 only indicates that "You don't have a field/column named v_avg_salary", it doesn't say that "You use the function incorrectly". Is that right?
Thanks,
Carl
1 answers ( 0 marked as helpful)
Hi Carl!
Thanks for reaching out.
Yes, it means that Workbench does not find such a variable. Actually, there is such a variable but it is of another scope, not the global.
Hope this helps.
Best,
Tsvetelin