Resolved: DECLARE statement location
Hi everyone, I am confused. The video visually details the DECLARE statement in functions should be outside the BEGIN... END enclosure, however in the exercises, even when using functions, the DECLARE statement is always found inside it. What's the reason to put DECLARE outside the aforementioned enclosure?
Thanks whoever clarifies my question and hope everything is ok with all of you
Edsson
Hi Edsson!
Thanks for reaching out.
Thank you very much for pointing this out!
Please stick to the code you see in the *.sql files. We have made a mistake in the video. We will correct it the next time we are updating the course for sure. DECLARE must be used within the BEGIN-END block. So, first you need to use BEGIN, and then - DECLARE.
Hope this helps.
Best,
Tsvetelin
Hi Tsvetelin
Thanks so much for the response!