Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



What is SQL Stored Procedures?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 20-02-2010
technika's Avatar
Member
 
Join Date: Nov 2009
Posts: 688
What is SQL Stored Procedures?

Hello, I have recently started to learn the SQL Database Language and while learning it I am not able to understand the concept of the Stored Procedures. I have tried to learn it, but I am not getting the concept behind it. So, if you are having any knowledge about it, then please provide help to me to know the exact concept behind the SQL Stored Procedures.
Reply With Quote
  #2  
Old 20-02-2010
opaper's Avatar
Member
 
Join Date: May 2008
Posts: 2,362
Re: What is SQL Stored Procedures?

When any type of group of Transact-SQL statements compiled into a single execution plan then it is called as stored procedure. If you are making use of the Microsoft SQL Server 2000 then your stored procedures must return data in four ways below:
  • Output parameters
  • Return codes
  • A result set
  • A global cursor
Reply With Quote
  #3  
Old 20-02-2010
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
Re: What is SQL Stored Procedures?

Hi, if you are making use of the stored procedure in your sql then the Benefits of Stored Procedures are as below:
  • Precompiled execution
  • Reduced client/server traffic
  • Efficient reuse of code and programming abstraction
  • Enhanced security controls
Reply With Quote
  #4  
Old 20-02-2010
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
Re: What is SQL Stored Procedures?

A stored procedure is a group of SQL statements that form a logical unit and perform a particular task, and they are used to encapsulate a set of operations or queries to execute on a database server. For example, operations on an employee database (hire, fire, promote, lookup) could be coded as stored procedures executed by application code. Stored procedures can be compiled and executed with different parameters and results, and they may have any combination of input, output, and input/output parameters. This simple stored procedure has no parameters. Even though most stored procedures do something more complex than this example, it serves to illustrate some basic points about them.
Reply With Quote
  #5  
Old 20-02-2010
Praetor's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,937
Re: What is SQL Stored Procedures?

Hello, if you want to create a stored procedure then you must need to make use of the query as given below:
Code:
CREATE PROCEDURE <procedure name>
@location <data-type>(<size>)
AS
SELECT <field name>.......
FROM <Table name>
WHERE <condition if any>
Reply With Quote
  #6  
Old 20-02-2010
Reegan's Avatar
Member
 
Join Date: Oct 2005
Posts: 2,299
Re: What is SQL Stored Procedures?

Hello, if you are having knowledge of programming language then the Stored procedures in SQL Server are same as procedures in other programming languages which can perform the following for you:
  • It can simply able to get the parameters provided by the input and can return you different values as a output.
  • It can also contain the programming statements which have the ability to perform the operations on the database. It can also call other procedures.
  • It can provide you success or failure of the procedure by calling procedure.
  • It can provide you reason for your procedure execution failure.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is SQL Stored Procedures?"
Thread Thread Starter Forum Replies Last Post
Extracting stored procedures Maal-Gaadi Software Development 3 29-12-2010 07:29 PM
Using stored procedures and stored functions in MySQL Adiran Software Development 6 14-12-2010 01:54 AM
Calling Oracle Stored Procedures with PHP Landan Software Development 5 12-02-2010 05:37 PM
How to execute Stored procedures in Hibernate? NegiRaj Software Development 3 11-08-2009 12:54 AM
Is it a good practice of creating and using stored procedures for a database? Sentential Software Development 3 03-08-2009 10:13 PM


All times are GMT +5.5. The time now is 11:59 AM.