SQL stored procedure naming rules
Standardized naming can improve the efficiency of development and maintenance. If you are creating a new stored procedure, refer to the following naming rules.
Syntax:
The stored procedure name includes the following syntax:
[Proc] [maintablename] by [fieldname (optional)] [action]
[1] [2] [3] [4]
[1] All stored procedures must have the prefix "proc _" and all system stored procedures must have the prefix "SP _".
Note: If the stored procedure is named with the prefix SP _, it runs slowly because SQL Server first searches for the system stored procedure.
[2] The table name is the primary object accessed by the stored procedure.
[3] optional field names are condition clauses. For example: proc_userinfobyuseridselect
[4] The final behavior verb is the task to be executed in the stored procedure.
If the stored procedure returns a record, the suffix is: select
If the Stored Procedure inserts data, the suffix is insert.
If the stored procedure updates data, the suffix is: update.
If the stored procedure is inserted or updated, the suffix is: Save
If the Stored Procedure deletes data, the suffix is: Delete.
If the stored procedure updates the data in the table (ie. Drop and create), the suffix is: Create
If the stored procedure returns an output parameter or 0, the suffix is output.