SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you know WHEN to use STORE PROCEDURE

    I need to execute sql and pass two application variables' values to sql, so that every row of record, with field commission, is summed with two additional app variable values.

    Do I need stored procedure?

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    do you need a stored procedure? probably not. it sounds like what you need could be completed in a single statement.

    typically, you would use stored procedures in one of the following manners, depending on application requirements and developer style:
    • not all all
    • when it's convenient for code reuse or to speed up certain operations
    • require all inserts, updates and deletes to use stored procedures to maintain consistent data
    • require all data access (read or write) to use stored procedures to maintain consistent data and to limit visibility or rows to certain users and prevent arbitrary queries


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •