-
Notifications
You must be signed in to change notification settings - Fork 13.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL - notes and maybe one wrong answer #6513
Comments
Option 1: Stored Functions for Formulas and Business Rules in Queries Imagine you're working with a lot of information in a database. Sometimes, you want to do the same kind of calculation or operation on different pieces of that information. A stored function is like a special tool you can create. You tell it how to do a specific job, and then you can use it over and over again on different parts of the data. Option 2: Stored Functions in Trigger Events Now, think of a trigger as a kind of alarm in your database. It goes off when something important happens, like when a new piece of information is added (inserted). When this happens, you might want to do some special tasks right at that moment. A stored function can be like a helper that knows how to do those tasks. It doesn't need extra instructions because it already knows what to do with the information that triggered the alarm. So, both options are like tools in a toolbox. One is good for doing the same task on different data, and the other is good for doing specific tasks when something important happens. They're just used in different situations, but they're both very handy! |
@mmm4m5m @Ebazhanov closed this issue as complete by the PR #6517 |
hey can you assign me this issue, Would love to work on it. |
@HimanshuMahto you can start contributing just making PR |
Made the PR please do check it |
I'm submitting an ISSUE: please check one with "x"
Q7 and Q114 - duplicate questions
Q14 and Q90 - duplicate questions
Q100, Q104, Q105 - similar questions
Q115 - looks like the answer should be (1) GROUP_BY
I wonder why (2) is the correct answer? Why not answer (1)?
It is about functions. In the trigger I have all the data and I do not need to pass function parameters, I can use a procedure in that case.
The text was updated successfully, but these errors were encountered: