What's the best practice of naming stored procedure for t-sql?

前端 未结 10 1871
再見小時候
再見小時候 2020-12-15 17:24

I have worked with several big databases and the names of stored procedures were very different:

SP_PrefixXXX
PrefixYyyXxx
Prefix: Rep, Act
10条回答
  •  青春惊慌失措
    2020-12-15 17:43

    Not "sp_", nor "usp_". We know they're stored procedures, the naming scheme doesn't need to tell us.

    I generally just name them for what they do, possibly partitioning them on schemas. The exceptions are that I will use an "ssis_" prefix for stored procedures which aren't directly used as part of the "normal" database operations, but which are used by an SSIS package to reference the database. I may use "fn_" to indicate a function, to distinguish it from a stored procedure.

提交回复
热议问题