Using Code Analysis in SQL Prompt

preview_player
Показать описание
In this Super SQL Tip Redgater Jamie Wallis explains how you can get suggestions to improve as you type with new code analysis rules in SQL Prompt.

Transcript:
Hi, it’s Jamie Wallis from Redgate software here and I’d like to show you how code analysis works in SQL Prompt.
I’m going to use SSMS here, but code analysis is also available Visual Studio.
First I’m going to use SQL Prompt tab history to open a query I’ve been working on.
As you can see there a now green underlines beneath parts of my code.
This indicates that there could be issues that need addressing.
When I hover over I can see quick tip about the issue, and when I click the part of the code I am checking is highlighted in green.
There is also a new lightbulb icon to the left of my query now, which opens the Issue Details panel when I click on it.
Here I can see further information about the issue and how I could fix it.
There is also a link to our online documentation which contains further reading about the rules.
Finally in this panel I can choose to disable the rule, which stops it displaying in my code.
To bring it back I simply click “Enable rule” again.
But there is another way to manage your code analysis rules.
In the SQL Prompt menu at the top here you can find “Manage code analysis rules”.
This opens the code analysis options menu, which gives you the full list or rules available, grouped together into related section.
To disable any I just uncheck the box next to the rule, and then press save when I’m done.
So there you have it, code analysis in SQL Prompt.
You can try it out now by downloading your free-trial from our website.
This is Jamie Wallis from Redgate Software.
Thank you for watching.
Рекомендации по теме