Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure Naming Convention
Message
De
18/01/2015 20:35:29
 
 
À
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:
01613843
Vues:
48
I always put the action first so it mimics method names. And I never use an underscore. It doesn't make it easer to read and is extra keystrokes.

>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?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform