We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Can we execute  stored procedure  inside a user defined function  in ms sql server?

Medium Priority
Last Modified: 2012-05-06
Can we execute  stored procedure  inside a user defined function  in ms sql server?

if yes, then can u give an example? is there any adverse effect ?
Watch Question

No.  Only extended stored procedures.  You also cannot use dynamic SQL in a UDF.
Tapan PattanaikSenior Engineer



Can we use  stored procedure  inside a user defined function  in ms sql server?
No you can't, as I stated above.  You can execute EXTENDED stored procedures, but not system or user stored procedures.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
While you may not have gotten the answer you desired, it is 100% correct and a B is not an appropriate answer.  I would ask that you "request attention" and have the grade changed.  Request Attention can be found in your original post.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.