Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming convention
Message
De
29/10/1999 17:40:02
 
 
À
29/10/1999 16:08:45
Christian Bellavance
Université du Québec à Hull
Hull, Québec, Canada
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00283872
Message ID:
00284131
Vues:
20
From SQL Server BOL

"It is strongly recommended that you do not create any stored procedures using sp_ as a prefix. SQL Server always looks for stored procedures beginning with sp_ in this order:

Look for the stored procedure in the master database first.
Look for the stored procedure based on any qualifiers provided (database name or owner).
Look for the stored procedure using dbo as the owner, if one is not specified.
Therefore, although the user-created stored procedure prefixed with sp_ may exist in the current database, the master database is always checked first, even if the stored procedure is qualified with the database name."

All of that aside, I would really have to say that it's a convention issue.
When someone see a stored procedure that beings with sp_ there's an assumption that it's a system stored procedure and not a user stored procedure. There is nothing within SQL Server that will prevent you from creating a stored procedure that beings with sp_.

I prefix stored procedures with p_.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform