0 votes
in Sql by
What is a Stored Procedure in SQL?

1 Answer

0 votes
by
A stored procedure is a subroutine available to applications that access a relational database management system (RDBMS). Such procedures are stored in the database data dictionary. The sole disadvantage of stored procedure is that it can be executed nowhere except in the database and occupies more memory in the database server. It also provides a sense of security and functionality as users who can't access the data directly can be granted access via stored procedures.

DELIMITER $$

CREATE PROCEDURE FetchAllStudents()

BEGIN

SELECT *  FROM myDB.students;

END $$

DELIMITER ;

Related questions

0 votes
0 votes
asked Jun 15, 2023 in Sql by Robin
0 votes
asked Mar 18, 2021 in PL/SQL by sharadyadav1986
...