functions and procedures

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinod
    New Member
    • Aug 2006
    • 40

    #1

    functions and procedures

    Dear Experts,
    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 guidence
  • vssp
    Contributor
    • Jul 2006
    • 268

    #2
    Hai friend

    I hope this link helpful for u
    Resources from the authors, creators, innovators, & leaders of technology - home to leading publishers Addison-Wesley Professional, & Sams.

    Comment

    • Seun Ojo
      New Member
      • Aug 2006
      • 14

      #3
      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...optimi zes network traffic

      Basically u pass parameters(or list of parameters) to a function; it does some work n returns a result(optional ly)...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...

      Comment

      • vinod
        New Member
        • Aug 2006
        • 40

        #4
        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.

        Comment

        Working...