Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Murali
(50)
Abraham Kuriak...
(28)
Deepika Harida...
(26)
Last 7 Days
Deepika Harida...
(1175)
Pradeep Y
(997)
amarababu nara...
(961)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
Stored Procedures
Posted Date: 23 Sep 2008 Resource Type:
Articles
Category:
Databases
Posted By:
Shashi
Member Level:
Gold
Rating:
Points
: 10
What Stored Procedure means ?
A Stored procedure is a database object that contains one or more SQL statements. In this article you will get an idea on how to create and use stored procedures and also highlighted on how to use stored procedure.
The first time a stored procedure is executed; each SQL statement it contains is compiled and executed to create an execution plan. Then procedure is stored in compiled form with in the database. For each subsequent execution, the SQL statements are executed without compilation, because they are precompiled. This makes the execution of stored procedure faster than the execution of an equivalent SQL script.
To execute a stored procedure you can use EXEC statement.
CREATE PROC spGetShashi
AS
SELECT * FROM SHASHI
When you run this script in Pubs database you will get the following message in Query Analyzer.
The Command(s) completed successfully.
Now you are ready to call/execute this procedure from Query Analyzer.
EXEC spGetShashi
This stored procedure creates a result set and returns to client.
You can call a stored procedure from within another stored procedure. You can even call a stored procedure from within itself. This technique is called a recursive call in programming. One of the advantages of using stored procedures is that application programmers and end users don’t need to know the structure of the database or how to code SQL. Another advantage of it is they can restrict and control access to a database.
Now days every one is familiar with SQL Injection Attack I think stored are the way this can be prevented from this malicious attack.
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
Stored Procedures
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Vbs Script to get 5 days back registered customer details from DataBase every Day
Previous Resource:
How to Create a Stored Procedure?
Return to Discussion Resource Index
Post New Resource
Category:
Databases
Post resources and
earn money
!
Related Resources
How to improve Performance hit in SQL
Eureka!!! Find ways to extract a particular column value
Selecting data by using LIKE with ESCAPE
Sql Server Reporting Services (SSRS)
Tips & Tricks in Temp Database
dotNet Slackers
BizTalk Adaptors
Web Design
conference call definitions
Contact Us
Privacy Policy
Terms Of Use