|
-
May 11th, 2005, 05:06 AM
#2
Frenzied Member
Re: stored procedure
 Originally Posted by pame1la
Im not sure if this the correct forum but anyway...
i'm am rewriting some update code which is used to update several tables in my sql server 2000 database, and am considering using stored procedure as I have read they help to improve performance (and I might require introduce some more security which can be done using stored procedure...)
I am very new to programming…..
1)when writing the sp can I write 1 stored procedure to update all tables, or is that not possible since some parameters have differernt names in the different tables??? And should all tables be updated using stored procedure..
Well... Always using Stored Procedure to perform database operations, is not a rule of thumb....
Stored Procedures are better in performance because the code within them is already compiled and so the time of Database Engine for compiling the query again and again is saved...
and obviously you shouldn't use one stored procedure to update all the tables... this is against the structured approach..
Use Stored Procedure when there is a query or set of database commands which are frequently being called by front-end...
About me... i don't use Stored Procedure to insert data into tables..one of the normal case when i use them is when i need to validate some user input against the values in one or more tables in the database..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|