Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure Naming Convention
Message
 
 
À
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:
01613883
Vues:
39
I think it is important to have consistency in naming. Once you stick with it, you don't have to think about it.

Good to see you, Bonnie.

>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?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform