Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure (Best Practices) Question

Status
Not open for further replies.

cranger01

IS-IT--Management
Oct 2, 2006
34
US
I am sure this is up for debate (or maybe there is an obvious answer).

I am creating a database with several tables that will be updated through a CMS. The Programmer requested Insert, Delete, Edit stored procedures.

Is it better to:

1) create 1 stored procedure to handle all 3 functions per table.

2) create 1 sp for each function and each table

3) try to figure out how to create 1 sp for everything.

4) have the programmer call one sp that determines which stored procedure to send the data too.

just curious.
 
Insert and update can be easily done in a single procedure. Delete would probably be via a secord procedure.

The best method for doing this will be what ever the best method is for the application. There are no hard and fast rules about this.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
no problem.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top