What is stored procedure?

A stored procedure is a set of SQL commands that has been compiled and stored on the database server.

Once the stored procedure has been “stored”, client applications can execute the stored procedure over and over again without sending it to the database server again and without compiling it again.

Stored procedures improve performance by reducing network traffic and CPU load.

Stored procedures are essentially functions that you can create in the database and reuse. What’s neat about them from a usability standpoint is that they can take input parameters and then return a result.