MySQL Stored Procedure | Create Procedure | PHPMyAdmin

Опубликовано: 14 Октябрь 2024
на канале: Knowledge Thrusters
911
13

In this mysql video, you will be able to create procedure in mysql.

What is a stored procedure?
A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again.
So if you have an SQL query that you write over and over again, save it as a stored procedure, and then just call it to execute it.
You can also pass parameters to a stored procedure, so that the stored procedure can act based on the parameter value(s) that is passed.

Video timings:
What is stored procedure : 00:21
Syntax: 00:56
Create Procedure: 01:40
Call using a query: 04:17
Update in stored procedure: 04:52

Syntax:
DELIMITER &&
CREATE PROCEDURE procedure_name [[IN | OUT | INOUT] parameter_name datatype [, parameter datatype]) ]
BEGIN
Declaration_section
Executable_section
END &&
DELIMITER ;

Documentation:
https://dev.mysql.com/doc/refman/8.0/...

#knowledgethrusters #php #mysql