This question is very personal, it is the same as asking a developer what advantage to use one or another programming language, he will say that "It depends on what you will do, how you will do and why you will do it" and a number of other advantages and disadvantages.
it is known that certain types of statements allocate more memory and others not so much, but even those that allocate less memory if consumed incorrectly while running the software will crash with your server.
I advise you to read this case and understand better than I’m talking about.
Using variables in Mysql
I hope I have helped you (the best syntax is the one that best suits your purposes).
I used indiscriminately, I already made stored Procedure with both and equal wheel, but then in short it means that user-defined I can use them within a Function or sp and continue with the value of it in another function call or sp if I keep connection ?
– SneepS NinjA
@Sneepsninja that’s right
– bfavaretto