← Quiz: Views, Triggers and Procedures: all 10 questions
Quiz: Views, Triggers and Procedures · Question 7 of 10
What is the key difference between a stored function and a stored procedure?
What is the key difference between a stored function and a stored procedure?
- A.Functions can only be written in Java
- B.A function returns one value and can be used inside a query; a procedure is run with CALL
- C.Procedures cannot take parameters
- D.There is no difference
Answer & explanation
Correct answer: A function returns one value and can be used inside a query; a procedure is run with CALL
You can write SELECT margin(price, cost) with a function, but not with a procedure.
Can you get the rest right without peeking?
Take the timed Quiz: Views, Triggers and Procedures quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →