What mean store procedure?rules of it : and basic guide?
What mean store procedure?rules of it : and basic guide?
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.
Joginder BangerPosted Nov 13, 2014, 10:12 AM
create proc testing
(
@sample varchar(max)=null // assign the null value is optional.
)
as
declare @tempid int
begin
select @tempid=columnname from tablename1 where columnname=@sample
another table define below
select * from tablename2 where columnname=@tempid
end
i hope you understand.
rgowthamraj ramajayamPosted Nov 13, 2014, 8:25 AM
Joginder BangerPosted Nov 13, 2014, 7:58 AM
rgowthamraj ramajayamPosted Nov 13, 2014, 7:54 AM
Joginder BangerPosted Nov 13, 2014, 2:42 AM
Store Procedure is a main concept in programming line. we can work without store procedure but some problem will be occur. Sql Injection it is dangerous for our development link. for more info about the Sql injection hit this link
http://www.programmerinterview.com/index.php/database-sql/sql-injection-example/
. A store procedure is protect our sql query.
for example I search the records behalf on customer Mobile Number. I need a textbox and one button . I written a simple query
sqlCommmand com= new SqlCommand("select * from tablebame where mobileNO='"+textbox1.text'",connection string");
//another do stuff here
it's work fine. if we enter in the textbox --select * from table. query automatic comment and all data return.
This type of problem store procedure protect.
no need compile every time. A lot of advantage if we used the Store procedure.