Stored Procedure are a set of SQL statements(one or more) typically grouped together to perform a specific routine. Stored procedure can be created in any user defined database and system database except the resource database. They are comparable to multi statement functions .The most benefits of using stored procedure is as follows:
1. Improve performance because they are compiled code
2. easy to maintain
Stored Procedure is a four types in MSSQL SERVER 2012:
1. User-defined
2. System
3. Temporary
4. Extended user-defined(replaced by CLR Procedure)
Here, we are define a simple Stored Procedure to get Name which id i will pass externally :
Class Structure is as follows:
Stored Procedure:
Now we see all data in Employee table data:
Now, we are executing stored procedure:
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers