answersLogoWhite

0


Best Answer

A stored procedure is like a miniture program in SQL Server. It can be as simple as a select statement, or as complex as a long script that adds, deletes, updates, and/or reads data from multiple tables in a database. (Stored procedures can also implement loops and cursors which both allow you to work with smaller results or row by row operations on data.) The SQL Server functions are option for doing certain operations in SQL Server. They can not be used to update, delete, or add records to the database. They simply return a single value or a table value. They can only be use to select records. However, they can be called very easily from within standard SQL, such as: SELECT dbo.functionname('Parameter1') OR SELECT Name, dbo.Functionname('Parameter1') FROM sysObjects For simple reusable select operations, functions can simply your code. Just be wary of using JOIN clauses in your functions. If your function has a JOIN clause and you call it from another select statement that returns multiple results, that function call with JOIN those tables together for EACH line returned in the result set. So though they can be helpful in simpling some logic, they can also be a performance bottleneck if they're not used properly.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

A function can return only one value and must return one value, but the procedure can return => 0 values.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between function and stored procedure in sql server?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between a preferred DNS server and an altenate DNS server?

What is the difference between a preferred DNS server and an altenate DNS server?Read more: http://wiki.answers.com/What_is_the_difference_between_a_preferred_DNS_server_and_an_altenate_DNS_server#ixzz2LRd3ICed


What is the difference between server and domains?

The difference between the server and domains is fairly simple. The server is the system on which the entire functions rest, and the domains are pages within that system. Imagine the server as a neighborhood and domains as houses.


What is the difference between client and member server?

client is share to data storage in server


What is a server's physical case?

what is the difference between a server physical case and a client case


What is difference between a firewall and ISA server?

hi


What is the difference between service provider and network provider?

what is the difference between a file server and a internet service provider


What is difference between Microsoft window 7 enterprise and Microsoft window 7 ultimate?

Enterprise use different activation procedure and requires a dedicated VLK server. Ultimate can be activated through Internet.


What is the difference between mysap and sap?

SAP - Client (installed)/Server mySAP web browser (Client)/Server


What function does a server have?

Server's function is to respond for the client's application requests


What is the difference between client server and mobile agent based approach?

noemally client server is used by client o server and mobile for calling


Difference between sql server 2003 sql server 2005?

There is no such thing as SQL Server 2003. Microft released SQL Server 2005 as the next version of SQL Server 2000.


What is the difference between LDAP and X500 in ADS windows server 2000?

ads