---
title: "What is the difference Function and Stored Procedure?"  
description: "What is the difference Function and Stored Procedure?"  
author: "Sumit Kesarwani"  
published: 2013-12-22  
updated: 2020-09-13  
canonical: https://www.mindstick.com/interview/1848/what-is-the-difference-function-and-stored-procedure  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# What is the difference Function and Stored Procedure?

UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be.

UDFs that return tables can be treated as another row set. This can be used in JOINs with other tables.

Inline UDF can be thought of as views that take parameters and can be used in JOINs and other Row set operations.

## Answers

### Answer by Sumit Kesarwani

UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be.

UDFs that return tables can be treated as another row set. This can be used in JOINs with other tables.

Inline UDF can be thought of as views that take parameters and can be used in JOINs and other Row set operations.


---

Original Source: https://www.mindstick.com/interview/1848/what-is-the-difference-function-and-stored-procedure

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
