Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: ✅ SQL database in Microsoft Fabric
There are two AI-powered quick actions that are currently supported in Copilot for SQL database: Explain and Fix.
Quick actions can accelerate productivity by helping you write and understand queries faster. These buttons are located at the top of the SQL query editor, near the Run button.
The Explain quick action leaves a summary at the top of the query and in-line code comments throughout the query to describe what the query is doing.
The Fix quick action fixes errors in your query syntax or logic. After running a SQL query and being met with an error, you can fix your queries easily. Copilot will automatically take the SQL error message into context when fixing your query. Copilot will also leave a comment indicating where and how it has edited the T-SQL code.
Copilot uses information about your database schema, query tab contents, and execution results to give you relevant and useful feedback on your query.
Whether you're a beginner or an expert in writing SQL queries, quick actions allow you to understand and navigate the complexities of the SQL language to easily solve issues independently.
To use Copilot to explain your queries, follow these steps:
Highlight the query that you want Copilot to explain. You can select the whole query or just a part of it.
Select the Explain button in the toolbar. Copilot analyzes your query and generates inline comments that explain what your code does. If applicable, Copilot leaves a summary at the top of the query as well. The comments appear next to the relevant lines of code in your query editor.
Review the comments that Copilot generated. You can edit or delete them if you want. You can also undo the changes if you don't like them, or make further edits.
To get Copilot's help with fixing an error in your query, follow these steps:
Write and run your query as usual. If there are any errors, you'll see them in the output pane.
Highlight the query that you want to fix. You can select the whole query or just a part of it.
Select the Fix button in the toolbar. This button will only be enabled after you run your T-SQL query and it has returned an error.
Copilot analyzes your query and tries to find the best way to fix it. It will also add comments to explain what it fixed and why.
Review the changes that Copilot made and select Run to execute the fixed query. You can also undo the changes if you don't like them, or make further edits.
Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Get started with SQL Database in Microsoft Fabric - Training
Learn how SQL Database in Microsoft Fabric works, the key concepts, and practical examples to help users SQL Database effectively as part of their analytics solutions.
Certification
Microsoft Certified: Fabric Analytics Engineer Associate - Certifications
As a Fabric analytics engineer associate, you should have subject matter expertise in designing, creating, and deploying enterprise-scale data analytics solutions.