This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Applies to: ✅SQL database in Microsoft Fabric
Copilot in Fabric in the SQL database workload includes a code completion feature with Copilot.
As you start writing T-SQL code or comments in the editor, Copilot in Fabric SQL database uses your database schema and query tab context to complement the existing IntelliSense with inline code suggestions.
Verify theShow Copilot completions setting in enabled in your database settings.

Code completion enhances your productivity and workflow in Copilot in Fabric SQL database by reducing the cognitive load of writing T-SQL code. It accelerates code writing, prevents syntax errors and typos, and improves code quality. It provides helpful, context-rich suggestions directly within the query editor. Whether you're new or experienced with T-SQL, code completion helps you save time and energy with writing code, and focus on designing, optimizing, and testing your database.
To begin using the Copilot Code Completion feature, follow these steps to enable and utilize its capabilities effectively in the SQL query editor.
Start writing your query in the SQL query editor within the database. As you type, Copilot provides real-time code suggestions and completions of your query by presenting a dimmed ghost text.

You can then accept the suggestion with theTab key, or dismiss it. If you don't want to accept an entire suggestion from Copilot, you can use theCtrl+Right keyboard shortcut to accept the next word of a suggestion.
Copilot can provide different suggestions for the same input. You can hover over the suggestion to preview the other options.
To help Copilot, understand the query you're writing, you can provide context about what code you expect by leaving a comment with--. For example, you could specify which database object, condition, or methods to use. Copilot can even autocomplete your comment to help you write clear and accurate comments more efficiently.

Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?