Home > Database > Mysql Tutorial > body text

What is the difference between MySQL stored procedures and functions?

PHPz
Release: 2023-08-25 17:09:09
forward
1361 people have browsed it

What is the difference between MySQL stored procedures and functions?

Stored Procedure

In MySQL, stored procedures can be called through the call statement. a stored procedure Return multiple values.

The stored procedure returns 0 by default. It cannot be used in SQL queries and is based on Precompiled.

function

Functions can be called within statements. It can return a value with the help of return statement, it only returns a value.

The function returns any single value, which can be a table. It can be used in SQL queries but not based on precompilation.

The above is the detailed content of What is the difference between MySQL stored procedures and functions?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!