Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure Naming Convention
Message
De
18/01/2015 20:32:16
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Web
Divers
Thread ID:
01613725
Message ID:
01613841
Vues:
51
In the link provided by Craig, they suggested using either the name of the Action first:

csp_GetPerson

or the name of the table first:

csp_PersonGet

I have always preferred putting the table name first, that way they all get grouped together, making them easier to find in SSMS. I also put an underscore after the table name (I think it's more readable):

csp_Person_Get

That suggestion isn't limited to table names, you could also use business processes (if the Stored Proc is going to be accessing several tables). For example:

csp_Orders_GetHistory
csp_Orders_GetCustomer

~~Bonnie


>I am sure this question has been asked a million times. And yet I am asking it again. I see everywhere online stored procedures named with prefix sp (e.g. sp_custom_account). Is there a technical or a logical reason for that? Since stored procedures are in SQL DB Programmability -> Stored Procedures, why need to tag them as SP still?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform