---
title: "How to use RETURN keyword in Stored Procedure in SQL Server?"  
description: "How to use RETURN keyword in Stored Procedure in SQL Server?"  
author: "Steilla Mitchel"  
published: 2021-10-21  
updated: 2021-10-21  
canonical: https://www.mindstick.com/forum/156793/how-to-use-return-keyword-in-stored-procedure-in-sql-server  
category: "mssql server"  
tags: ["sql server", "sql", "sql-server-2016"]  
reading_time: 1 minute  

---

# How to use RETURN keyword in Stored Procedure in SQL Server?

How to use RETURN [keyword](https://www.mindstick.com/forum/33572/sql-inner-join-keyword) in [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 in SQL](https://www.mindstick.com/forum/158350/what-is-a-stored-procedure-in-sql-server-and-how-to-create-one) [Server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over)?

## Replies

### Reply by Steilla Mitchel

**[Stored Procedure](https://www.mindstick.com/articles/803/using-stored-procedure-in-asp-dot-net) with RETURN keyword:**

The use of RETURN keyword in [SQL](https://www.mindstick.com/articles/13115/types-of-keys-in-sql-or-oracle-database) Stored Procedure is to return the process after executing a specific part of stores procedure. If you have created a large stored procedure and you want to execute or run only some part of that stored procedure and then close execution then you can use the RETURN keyword after that specific part of code that you want to execute. The RETURN keyword return the process of execution after process a specific part of code.

Ex-

```
 CREATE PROCEDURE usp_ReturnProcedure
AS
BEGIN
  --SQL statement that you want to processed.
  RETURN;
  --other SQL statements.
END
GO
```

\


---

Original Source: https://www.mindstick.com/forum/156793/how-to-use-return-keyword-in-stored-procedure-in-sql-server

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
