Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Azure Data Studio is retiring on February 28, 2026. We recommend that you use Visual Studio Code. For more information about migrating to Visual Studio Code, visit What's happening to Azure Data Studio?
This article describes ways to use the GitHub Copilot extension for Azure Data Studio.
Copilot prompts for common SQL syntax
When you create Transact-SQL (T-SQL) in an editor, GitHub Copilot can provide suggestions for common T-SQL syntax. For example, if you're writing a query that joins two tables, Copilot suggests the join condition from columns in the open editor, other files in the workspace, and common syntax patterns.
Copilot prompts from comments
Copilot's suggestions can be directed from comments in the editor, including natural language comments. For example, if you write a comment that describes a query, Copilot provides suggestions for the query.
Copilot's suggestions may complete parts of the syntax required for the query, or may complete the entire query. In the previous example, Copilot began the query to PIVOT the data. In the following image, Copilot completed the PIVOT query based on the comment.
See alternative suggestions
During Copilot's use in a T-SQL editor, you can see alternative suggestions, if any are available, by pressing Alt
+[
(or Option
+[
on macOS) to cycle through the suggestions. The previous suggestion is shown by pressing Alt
+]
(or Option
+]
on macOS).
You can see multiple suggestions by pressing Ctrl
+Enter
to open the Copilot Completions Panel. The Copilot Completions Panel shows multiple suggestions for the current context of the editor.
Work with IntelliSense
GitHub Copilot works with IntelliSense to provide suggestions for code completion. IntelliSense is a feature of Azure Data Studio that provides suggestions for code completion, parameter info, and object names. IntelliSense is enabled by default in Azure Data Studio and provides its suggestions based on the context of the current connection and all SQL syntax.
The suggestions provided by IntelliSense are completion of a single word or phrase. GitHub Copilot provides suggestions for entire lines of code, including syntax and formatting.
IntelliSense, Code Snippets, GitHub Copilot
When you develop your code in Azure Data Studio, you have three assistants to help you:
- IntelliSense
- Create and use code snippets to quickly create Transact-SQL (T-SQL) scripts in Azure Data Studio
- GitHub Copilot
Consider these assistants as an extra pair of hands that work independently. It's crucial to understand the difference between them, and when to use them.
Assistant | Overview | Activation and deactivation |
---|---|---|
IntelliSense | Feature in Azure Data Studio code editor that provides suggestion for code completion, parameter info, and object names. | Enabled by default in Azure Data Studio. To deactivate, Go to Settings or press Ctrl + , , type IntelliSense and uncheck the boxes as per requirement. |
Code Snippets | Mini T-SQL code templates that are inbuilt or custom made, which assist with generating proper code syntax. | Enabled by default in Azure Data Studio. To deactivate, Go to Settings or press Ctrl + , , type Snippets and uncheck the boxes as per requirement. |
GitHub Copilot | AI powered pair programmer extension that provides context-aware code completions, suggestions, and even entire code snippets. | Comes with the GitHub Copilot Extension in a subscription model. Can activate from Copilot status icon present in Azure Data Studio status bar. |
Privacy
Your code is yours. We follow responsible practices in accordance with our Privacy Statement to ensure that your code snippets aren't used as suggested code for other users of GitHub Copilot.