Last answered:

05 Oct 2022

Posted on:

04 Oct 2022

1

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

2 answers ( 2 marked as helpful)
Instructor
Posted on:

05 Oct 2022

3

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

Posted on:

05 Oct 2022

0

Hi Tsvetelin

Thanks so much for the response!

Submit an answer