---
title: "use output parameter in stored procedure"  
description: "use output parameter in stored procedure"  
author: "Anonymous User"  
published: 2015-12-07  
updated: 2015-12-07  
canonical: https://www.mindstick.com/forum/33691/use-output-parameter-in-stored-procedure  
category: "database"  
tags: ["sql server", "sql", "sql server 2008", "sql server 2012"]  
reading_time: 1 minute  

---

# use output parameter in stored procedure

I want to use [output](https://www.mindstick.com/interview/34427/explain-the-output-in-angular) [parameter](https://www.mindstick.com/blog/450/parameter-class-in-c-sharp) in [stored procedure](https://www.mindstick.com/articles/803/using-stored-procedure-in-asp-dot-net) please help me.

## Replies

### Reply by Anonymous User

Setting up output paramters for a [stored](https://www.mindstick.com/forum/157561/what-is-the-stored-procedure-create-a-procedure-to-find-the-record-by-stu_id-from-the-student-table) [procedure](https://www.mindstick.com/forum/32/stored-procedure-return-datatype) is basically the same as setting up input parameters, the only difference is that you use the OUTPUT clause after the parameter name to specify that it should return a value. The output clause can be specified by either using the keyword "OUTPUT" or just "OUT".

```
create proc Sp_EmpData(@totalcount int output)asbegin  select @totalcount=(select count(*) from Employee); end DECLARE @totalcount intEXEC Sp_EmpData @totalcount = @totalcount OUTPUTselect @totalcount
```

![use output parameter in stored procedure](https://www.mindstick.com/mindstickforums/583d1d10-7ec9-4bc2-be28-5fac82bb311d/images/bbceb6bd-cc31-4624-b175-6cea225f7d0f.png)


---

Original Source: https://www.mindstick.com/forum/33691/use-output-parameter-in-stored-procedure

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
