Using Stored Procedures that Perform Actions on Data
Go Up to Using a Stored Procedure
Stored procedures can be coded such that they do not return any data at all, and only perform some action in the database. SQL operations involving the INSERT
and DELETE
statements are good examples of this type of stored procedure. For instance, instead of allowing a user to delete a row directly, a stored procedure might be used to do so. This would allow the stored procedure to control what is deleted and also to handle any referential integrity aspects, such as a cascading delete of rows in dependent tables.