Code inspection and quick-fixes in SQL and NoSQL
The key features of ReSharper's code analysis are also supported in SQL. You can find the detailed information on these features in the corresponding topics of the Code analysis section. In the main topic of the section, you can also find the feature matrix and check what exactly is supported in SQL.
In this topic, you can find some examples of using code analysis features in SQL.
Code inspection
ReSharper's static code analysis can detect more than a hundred different errors and problems in SQL code.
The analysis is performed by applying code inspections to the current document or in any specified scope.
To look through the list of available inspections for SQL, open the Alt+R, O, and then expand the SQL node.
page of ReSharper optionsQuick-fixes
Quick-fixes let you automatically resolve most of code issues found with code inspection. If one or more quick-fixes are available for a code issue, you will see the corresponding action indicator when your caret is on the highlighted code. Press Alt+Enter to see and apply the desired fix.
ReSharper provides dozens of quick-fixes for SQL. Here are some examples:
Introduce alias
For derived tables that do not have a mandatory alias in MySQL, ReSharper provides the Introduce alias quick-fix:

After applying the fix:

Quote identifier
If you declare an identifier named with a reserved SQL keyword, ReSharper provides the Quote identifier quick-fix that helps you solve the problem:

After applying the fix:

Make ReSharper ignore specific code
To exclude parts of your solution's code from code analysis, navigation, and other features, ReSharper allows you to ignore specific files, folders and file masks in different ways.
To improve performance, ReSharper also automatically detects and starts ignoring large web files that have no references and were probably added to the solution by mistake.
If any of such files are detected, you will see a notification where you can stop ignoring any of those files if you need them. You can also find all automatically ignored files on the
page of ReSharper options .To stop auto-detection and ignoring large unused web files, clear the Search for web files that can affect performance and exclude them from indexing checkbox on the page of ReSharper options .