Database Programming
The Difference Between
Oracle Database

What is difference between function and stored procedure in sql server?

Top Answer
User Avatar
Wiki User
Answered 2009-06-09 07:29:11

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

Your Answer

Still Have Questions?

Related Questions

What is difference between server mainframes?

what is difference between server & mainframes

What is the difference between the client and the server?

what is the difference between server and client computer

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 the dumb and intelligent terminals?

Dump Terminal is just activate the server function but there is no separate function in own terminal (not autonomous)ButIntelligent Terminal is having autonomous and also client function

What is the difference between client and member server?

client is share to data storage in server

What is the difference between normal system and server?

A server is used for file storage and website hosting.

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 the difference between an FTP server and a file server?

An ftp server is a subset of file servers. Ftp is the protocol you use to get the files.

What is the difference between tomcat and Apache?

tomcat is server and apache is software tomcat is server and apache is software

What is the difference between workstation and server?

workstation is controlled by man but server is controlled by networrk of different computers

Difference between primary server and secondary server?

from the word itself primary means main, secondary means backup or support server

Difference between peer to peer network and client server network?

client server network has a server but peer to peer to network does not have.

What is the difference between a server rack and a data rack?

Depth of server rack is 1000mm and of data rack is <=800mm

What is the difference between mysap and sap?

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

What is the difference between web client and web server?

Web client receives and sends information to and with the web server.

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 web server and web browser?

A web browser is something you browse the web and a server is where you host a website like google is a server

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

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 a database and a database server?

A database is a file. A database server is a computer that shares that file over a network.

How can a server tell the difference between many clients on a server?

Each client has a unique IP address which identifies it on the network.

What are the differences between Windows Server 2008 and Linux?

Dears can anyone help me to understand the difference between the Domain and the Domain controller in windows server 2008.

Still have questions?

Trending Questions
How to Make Money Online? Asked By Wiki User
Best foods for weight loss? Asked By Wiki User
Does Neil Robertson wear a wig? Asked By Wiki User
Unanswered Questions