Do not preface a stored procedure with sp_. Commonly accepted prefixes are:
sp or s (vw or v for views)
s21 where the 21 refers to the program number that uses this SP. This has the advantage of keeping all SP's for program 21 together.
The balance of the name should include a description of its action, e.g.
UpdateInvoice (note the use of Proper Case and no underscores)
User Defined Functions
A prefix isn't needed for two reasons:
When a function is called it must be prefaced by the ownerÆs name, e.g. dbo.FunctionName.
You shouldn't be writing very many UDFs as they are inefficient.
Table names require no prefix to identify them as their use makes it fairly obvious as long as Views have a prefix.
Use descriptive names, no abreviations and no plurals. Some writers prefer to use plural where it seems appropriate, but my quarrel with them is that it is very difficult for everyone to agree when it is appropriate. Consequently, it is easier to leave no doubt and make them singular.
Designate look-up tables with either a prefix or suffix that will always indicate the tables purpose, e.g. luTableName or TableNameLkU.
Designate many-to-many tables (conjoint table) by using an underscore between the associated table names, e.g. Product_Supplier.
Never use a name that requires the use of [ ].
Avoid underscores, they look unnatural and slow the reader down.
Never use a column name that requires [ ]. Shame on Microsoft for excessive use of ID which requires the use of a table qualifier.
Use Proper Case, descriptive names and don't abbreviate.
Name primary keys with a suffix that denotes it data type.
TableNameID for integer (the preferred choice for all primary keys).
TableNameCode for varchar.
TableNameKey (other data types).
Do not change the spelling of the primary key from a parent table when it's used in a child table.
Don't use acronyms unless they are well know by programmers or all employees of your company.
For tables use the initials from each word, e.g. TableName TN (note the absence of AS).
For computed columns use the form Alias=Expression rather than Expression Alias as it cannot appear as another column rather than an alias.