Click here to Skip to main content
15,890,416 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to know the difference between them please if anyone can help
Posted

The main difference between the two is that a function provides the ability to RETURN a value when it is completed, while a stored procedure does not. However stored procedures will usually populate tables with data, or 'return' values in out parameters. :)
 
Share this answer
 
Comments
Salma-elearning 4-May-10 9:06am    
Thx :)
It's like in all programming languages: a function returns some usefull data, which can the be used in other functions or programs. A procedure is a self contained mini-program: it has a start and an end, and, it may use other procedures and functions to do it's job, but the what it returns is usually less important. A procedure can be a standalone thing, a function cannot.
 
Share this answer
 
Comments
Salma-elearning 4-May-10 9:07am    
Thx :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900