Stored Procedures Naming Standard
Stored Procedures
There have been a lot of discussing on using or not using Stored Procedures. All common database engines support stored procedures. We will not discuss the pros/cons of using them.
Unlike other database objects, Stored Procedures do not have to be tied to a table. The Name of the stored procedure should represent what it does.
Basic naming: ...<Verb><Noun>. Where <Verb> is action: insert, update, delete, Select and <noun> is the item the action is to be performed on.
For example: Inserting records into the client table. The <verb> is Insert, and the <noun> is Client.
Simple Name: procedure + <verb> + <Noun>
<verb>
insert or ins
update or upd
delete or del
select or sel
get (same as select)
put (combined insert/update)
Example: procedureInsertClient, procedureDeleteOrderDetail
Alternate Name: sp + <verb> + <Noun>
Example: spInsertClient, spDeleteOrderDetail
Note, when naming stored procedures on MS SQL, do not use sp_. That is used for the system database and the database engine will look there (and not find) before looking at your database.