---
title: "What is the difference between a user defined function and a Stored procedure?"  
description: "What is the difference between a user defined function and a Stored procedure?"  
author: "Anonymous User"  
published: 2015-01-21  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/2294/what-is-the-difference-between-a-user-defined-function-and-a-stored-procedure  
category: "mssql server"  
tags: ["sql server"]  
reading_time: 1 minute  

---

# What is the difference between a user defined function and a Stored procedure?

A user defined function and stored procedures are almost similar but there exists a difference between their implementation procedures in the code. Stored procedure needs to be invoked whereas a UDF can be used like any other statement.

## Answers

### Answer by Anonymous User

A user defined function and stored procedures are almost similar but there exists a difference between their implementation procedures in the code. Stored procedure needs to be invoked whereas a UDF can be used like any other statement.


---

Original Source: https://www.mindstick.com/interview/2294/what-is-the-difference-between-a-user-defined-function-and-a-stored-procedure

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
