HI,
What is the Stored procedure in Sql Server ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Mar 20, 2012, 3:51 AM
It will helps to increase the performance of the applications. Because its compiled once and it will use the same execution plan for all the subsequent requests.
It will accept parameters and returns the result set as tables. It can call the functions and other stored procedures.
The advantages and tips to increase the performance have been written in another article by me.
http://www.c-sharpcorner.com/UploadFile/skumaar_mca/good-practices-to-write-the-stored-procedures-in-sql-server/
Jignesh TrivediPosted Mar 20, 2012, 2:51 AM
A stored procedure is a subroutine or special function available to applications that access a relational database system.
SP in SQL are similar to procedures in other programming languages.
http://msdn.microsoft.com/en-us/library/ms191436%28v=sql.90%29.aspx
also refer our recommended article(just right side of this web page).
Prasant JinagaPosted Mar 20, 2012, 2:43 AM
Stored Procedures are nothing but special objects available in sql server. Its a precompiled statements where all the preliminary parsing operations are performed and the statements are ready for execution.
Its very fast when compared to ordinary sql statements where the sql statements will undergone a sequence of steps to fetch the data
Stored procedure involves various syntax based on the parameters passed.
Here is the syntax to create SP's
Create procedure SPName
as
begin
----Your query should be return here
end
To execute the stored procedure we have to use exec command,
Exec SPName
Thats it!!!
Thanks,
Prasant