---
title: "What are the stored procedures?"  
description: "What are the stored procedures?"  
author: "Anonymous User"  
published: 2010-10-15  
updated: 2020-09-17  
canonical: https://www.mindstick.com/interview/14/what-are-the-stored-procedures  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 2 minutes  

---

# What are the stored procedures?

Stored Procedure is a set of Structured Query Language (SQL) statements with an assigned name that's stored in the database in compiled form so that it can be shared by a number of programs. The use of stored procedures can be helpful in controlling access to data, preserving data integrity, and improving productivity.

## Answers

### Answer by vediappan ks

stored procedure 2 types first one is with parameters(@companyId int select * from mcompany where companyid= @companyID) second one is without parameter (select * from mcompany)\

### Answer by Pushpendra Singh

Stored Procedure is a set of Structured Query Language (SQL) statements with an assigned name that's stored in the database in compiled form so that it can be shared by a number of programs. The use of stored procedures can be helpful in controlling access to data, preserving data integrity, and improving productivity.

### Answer by Amit Singh

Stored procedures are similar to UDFs (user defined function).The major difference is that UDFs can be used like any other expression within SQL statements.\
\
for examples:\
\
ALTER procedure [dbo].[ProcedureName]\
@employeeid int,\
@employeepass varchar(50)\
\
as\
select * from sample\
where id=@id and pass=@pass\


---

Original Source: https://www.mindstick.com/interview/14/what-are-the-stored-procedures

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
