Check Naming Conventions for SQL Server (T-SQL) Code

Following ‘Naming Conventions’ is one of the best practices for SQL Server projects as they contribute to a better quality and maintainability of the code.

Finding non-compliant objects and fixing issues is time-consuming. The ‘Naming Conventions’ feature allows you to automate the detection of naming issues, in a configurable way.

How to Check Naming Conventions in SQL Server Projects:

  • Select your SQL Server Project in the Main view.
  • Click on ‘Naming Conventions’ in the navigation bar.
    Visual Expert lists the objects that do not follow the predefined naming rules along with a hint on the correction that needs to be made.

  • Check Naming Convention for SQL Server on Application level

  • Naming Conventions can also be called at root items like Procedures, Functions, Triggers, Views, etc.

  • check naming conventions for functions in sql server code


How to setup the ‘Naming Conventions’ feature for SQL Server 

Visual Expert provides a set of default naming rules, which can be customized as per your needs.

  • Mouse over the ‘Naming Conventions’ macro and click on the wrench that appears on its right end.

  • Naming convention macro wrench option

  • This opens a configuration window, where the rules can be modified as needed.

  • naming convention macro configuration

    You can also configure the naming conventions at the Project Settings level.

  • Open ‘More Settings’ under the ‘Settings’ tab on the top menu

  • Open project settings for naming conventions

  • Select the ‘Transact-SQL’ tab
  • Set the naming conventions as required for the current Visual Expert project. The changes will be automatically saved upon closing this window.

    Project Settings window for naming conventions in SQL server code


Visual Expert 2019, PowerBuilder, Oracle, SQL Server, Naming Conventions