What it is not recommended to name the user defined store procedures with sp_?

 Posted by Rajnilari2015 on 2/4/2016 | Category: Sql Server Interview questions | Views: 1560 | Points: 40

They are system defined and mostly resides under the master db. So if we write a user defined stored procedure by the name sp_ the query engine will first search the Stored Procedure inside the master db and if not found then it will search in the current session db. This brings unnecessary round trip. Better to use some other naming convention as usp_.E.g. instead of writing sp_GetEmployeesDetail, let's write usp_GetEmployeesDetail

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response