What are the stored procedures in MySQL? Also, write an example.
The stored procedure is like a subprogram in a typical computing language which is stored in the database. A stored procedure contains the name, list of parameters, and the SQL statements. All the relational database system works as pillars for stored procedures.
In this example, we are creating a simple procedure called job_data, when this procedure will get executed, all the data from "jobs" tables will get displayed.
Example
DELIMITER //
CREATE PROCEDURE GetAllPages()
BEGIN
SELECT * FROM pages WHERE title LIKE '%MySQL Interview Questions%';
END //
DELIMITER ;
Suggest An Answer
No suggestions Available!