I'm working for aproduct based company, i need guidence from you in some respects
1) how to become expertise in functions and stored procedures?
is there any good links for me, i'm a learner.of cource google is there, but i dont know the starting point.please provide me some good links, and your esteemed guidenceHai friend
I hope this link helpful for u
http://www.informit.com/guides/cont...&seqNum=56&rl=1|||let mi start by saying im a stored procedure envangelist, lover n guru...so u can direct any problem or tots in ds direction to mi personally...
Stored Procedures are precompiled functions that encapsulate some basic fxns...pretty much like functions in regular procedural languages like vb e.t.c; but its compiled once...n runs straight(faster) when called...optimizes network traffic
Basically u pass parameters(or list of parameters) to a function; it does some work n returns a result(optionally)...it could return just about anything...a number, string or query...its hard!
lets create something very simple...a stored procedure to calculate area of a rectangle..
d basic structure or framework of a stored procedure is as follows:
create proc procedurename
{list of parameters n their data types passed to d stored procedure}
as
{body of procedure}
now...d 'area stored procedure'
create proc area
@.length int, @.breadth int
as
-- @.result is a local variable
declare @.result as int
set @.result = @.length * @.breadth
select @.result as [Area of a Rectangle]
its dat simple...copy d code above n paste unda ur database in query analyser n press f5...
on a fresh window...test d procedure using d following:
exec area 5,4
.................................
its dat simple.....let mi no if u av problems running ds or if u av questions...
i dont particularly work wit functions...but i no its ds straight to
be good...|||Hello seun
its great fro me to meet a guru.i'm very happy with your words.i've started learning stored procedures, perticularly, when i get a doubt, i'm expecting help fromyou.
No comments:
Post a Comment