πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided DP-800 Domain 1
Domain 1 β€” Module 9 of 10 90%
9 of 28 overall

DP-800 Study Guide

Domain 1: Design and Develop Database Solutions

  • Table Design: Columns, Types, and Indexes Free
  • Constraints: Protecting Your Data Free
  • Specialised Tables and Graph Queries Free
  • JSON in SQL: Store, Query, and Index
  • Programmability: Views, Functions, Procedures, and Triggers
  • Advanced T-SQL: CTEs, Windows, and Correlated Queries
  • Pattern Power: Regular Expressions in T-SQL
  • Fuzzy String Matching: Finding Similar Text
  • AI-Assisted SQL with GitHub Copilot Free
  • MCP: Connecting AI to Your Database

Domain 2: Secure, Optimize, and Deploy Database Solutions

  • Encryption: Always Encrypted and Column-Level
  • Dynamic Data Masking and Row-Level Security
  • Permissions, Auditing, and Passwordless Access
  • Transaction Isolation and Concurrency
  • Query Performance: Plans, DMVs, and Query Store
  • SQL Database Projects: Build and Validate
  • CI/CD Pipelines for SQL Databases
  • Data API Builder: REST and GraphQL from SQL
  • Securing AI and API Endpoints
  • Change Detection: CES, CDC, and Change Tracking
  • Azure Integration and Monitoring

Domain 3: Implement AI Capabilities in Database Solutions

  • External AI Models: Choose, Create, Manage
  • Embeddings: Design, Chunk, and Generate
  • Choose Your Search Strategy
  • Vector Data: Types, Indexes, and Storage
  • Vector Search: Distance, ANN, and ENN
  • Hybrid Search and Reciprocal Rank Fusion
  • RAG with SQL: Prompt, Process, Respond

DP-800 Study Guide

Domain 1: Design and Develop Database Solutions

  • Table Design: Columns, Types, and Indexes Free
  • Constraints: Protecting Your Data Free
  • Specialised Tables and Graph Queries Free
  • JSON in SQL: Store, Query, and Index
  • Programmability: Views, Functions, Procedures, and Triggers
  • Advanced T-SQL: CTEs, Windows, and Correlated Queries
  • Pattern Power: Regular Expressions in T-SQL
  • Fuzzy String Matching: Finding Similar Text
  • AI-Assisted SQL with GitHub Copilot Free
  • MCP: Connecting AI to Your Database

Domain 2: Secure, Optimize, and Deploy Database Solutions

  • Encryption: Always Encrypted and Column-Level
  • Dynamic Data Masking and Row-Level Security
  • Permissions, Auditing, and Passwordless Access
  • Transaction Isolation and Concurrency
  • Query Performance: Plans, DMVs, and Query Store
  • SQL Database Projects: Build and Validate
  • CI/CD Pipelines for SQL Databases
  • Data API Builder: REST and GraphQL from SQL
  • Securing AI and API Endpoints
  • Change Detection: CES, CDC, and Change Tracking
  • Azure Integration and Monitoring

Domain 3: Implement AI Capabilities in Database Solutions

  • External AI Models: Choose, Create, Manage
  • Embeddings: Design, Chunk, and Generate
  • Choose Your Search Strategy
  • Vector Data: Types, Indexes, and Storage
  • Vector Search: Distance, ANN, and ENN
  • Hybrid Search and Reciprocal Rank Fusion
  • RAG with SQL: Prompt, Process, Respond
Domain 1: Design and Develop Database Solutions Free ⏱ ~12 min read

AI-Assisted SQL with GitHub Copilot

Use GitHub Copilot and Copilot in Fabric to write, debug, and optimise T-SQL β€” understand the security implications, configure instruction files, and get the most from AI-assisted development.

Your AI pair programmer for SQL

β˜• Simple explanation

Imagine having an expert SQL developer sitting next to you.

You describe what you want in plain English β€” β€œcreate a stored procedure that finds duplicate customers” β€” and they write the T-SQL for you. You can ask them to explain code, fix bugs, optimise slow queries, or suggest indexes. That is what GitHub Copilot does for SQL development.

But like any assistant, you need to review their work. Copilot can suggest code that looks right but has security flaws, uses deprecated features, or does not follow your company’s standards. This module teaches you how to use AI tools effectively AND safely.

The DP-800 exam covers AI-assisted SQL development across two platforms: GitHub Copilot (in VS Code, Visual Studio, and other IDEs) and Copilot in Microsoft Fabric (integrated into Fabric SQL notebooks and editors). Key exam areas include enabling and configuring these tools, understanding their security implications, creating instruction files for consistent output, and using MCP tool options for database-aware assistance.

GitHub Copilot for SQL development

GitHub Copilot provides AI assistance directly in your IDE. For SQL developers, it can:

  • Generate T-SQL from natural language descriptions
  • Complete code as you type (inline suggestions)
  • Explain existing queries line by line
  • Debug errors by analysing error messages with context
  • Optimise queries by suggesting index strategies or rewrites

Enabling GitHub Copilot

  1. GitHub account β€” requires a Copilot subscription (Individual, Business, or Enterprise)
  2. IDE extension β€” install the GitHub Copilot extension in VS Code or Visual Studio
  3. Organisation policy β€” for Copilot Business/Enterprise, an admin must enable it at the org level
  4. Sign in β€” authenticate with your GitHub account in the IDE

Chat vs inline suggestions

FeatureInline SuggestionsCopilot Chat
How it worksSuggests code as you typeConversational Q&A in a side panel
Best forWriting new code, auto-completing patternsExplaining code, debugging, asking questions
ContextCurrent file and open tabsCurrent file + explicitly attached context
InteractionTab to accept, Esc to dismissType questions, get explanations

Copilot in Microsoft Fabric

Fabric integrates Copilot directly into the SQL experience:

  • SQL notebooks β€” write natural language, get T-SQL
  • SQL editor β€” inline suggestions while writing queries
  • Data warehouse β€” AI-assisted query building against Fabric data

Enabling Copilot in Fabric requires:

  1. Fabric capacity (F64 or higher, or trial)
  2. Tenant-level admin setting enabled
  3. User must have appropriate Fabric permissions

Security impact of AI-assisted tools

This is a critical exam topic. AI tools introduce security considerations that developers must understand.

Security risks of AI-assisted tools β€” the exam expects you to identify and mitigate each
RiskWhat HappensMitigation
Code sent to external serviceYour T-SQL and schema context are sent to the AI model endpointReview data handling policies; use Copilot Business/Enterprise for IP protection
Sensitive data in promptsConnection strings, passwords, or PII in code context may be sentNever hardcode secrets; use environment variables and Key Vault references
Generated code may be insecureSQL injection vulnerabilities, missing parameterisation, overly broad permissionsAlways review generated code; never deploy AI suggestions without testing
Compliance and data residencyData may cross geographic boundaries during processingCheck Copilot data handling vs your compliance requirements (GDPR, SOC 2)
Intellectual propertyGenerated code may resemble public code or copyrighted patternsCopilot Business/Enterprise includes IP indemnity; configure content filters
πŸ’‘ Exam tip: The security question pattern

The exam often asks: β€œA developer is using GitHub Copilot to write queries against a production database. What is the MOST significant security concern?”

The answer is usually about sensitive data in context β€” schema names, table structures, and especially any hardcoded credentials that appear in the code context sent to the AI service. The mitigation is always: use parameterised queries, never hardcode secrets, and review organisational policies on AI tool data handling.

GitHub Copilot instruction files

Instruction files tell Copilot about your project’s conventions, standards, and constraints. They ensure consistent, compliant code suggestions.

.github/copilot-instructions.md

This file lives in your repository and provides project-wide context:

# Database Coding Standards

## Naming conventions
- Tables: PascalCase singular (Customer, not customers)
- Columns: PascalCase (FirstName, not first_name)
- Stored procedures: usp_ prefix (usp_GetCustomer)
- Views: vw_ prefix (vw_ActiveOrders)
- Indexes: IX_{Table}_{Columns}

## Security requirements
- Always use parameterised queries β€” never concatenate user input
- Use EXECUTE AS for stored procedures accessing sensitive data
- Apply principle of least privilege in all permission grants

## Performance standards
- Include SET NOCOUNT ON in all stored procedures
- Use SET XACT_ABORT ON for transaction safety
- Prefer inline TVFs over scalar functions
- Always include error handling (TRY...CATCH)

Model and tool options in chat

In Copilot Chat, you can configure:

  • Model selection β€” choose between available models (GPT-4o, Claude, etc.)
  • MCP tools β€” connect to database-aware tools for schema-aware suggestions
  • Context attachments β€” explicitly include files, schemas, or documentation
πŸ’‘ Scenario: Dev's Copilot setup at PixelForge

Dev Kapoor at PixelForge Studios creates a .github/copilot-instructions.md that includes:

  • Naming conventions (all tables use pf_ prefix)
  • Security rules (all user-facing queries must use parameterisation)
  • Performance guidelines (no scalar functions in SELECT lists)
  • Compliance notes (GDPR β€” never log PII in error messages)

Now when any developer on the team uses Copilot, the suggestions automatically follow PixelForge’s standards. Dev also connects the SQL MCP server so Copilot understands the actual database schema when suggesting queries.

Question

What is the purpose of a .github/copilot-instructions.md file?

Click or press Enter to reveal answer

Answer

It provides project-wide context to GitHub Copilot β€” coding standards, naming conventions, security requirements, and constraints. Copilot reads this file and tailors its suggestions to follow your team's rules. It lives in the repository root under .github/.

Click to flip back

Question

What is the biggest security risk of using AI-assisted tools for SQL development?

Click or press Enter to reveal answer

Answer

Sensitive data exposure β€” schema information, connection strings, and potentially PII in code context are sent to the AI model endpoint. Mitigate by: never hardcoding secrets, using Copilot Business/Enterprise for IP protection, and reviewing data handling policies.

Click to flip back

Question

What is required to enable Copilot in Microsoft Fabric?

Click or press Enter to reveal answer

Answer

Three requirements: (1) Fabric capacity F64 or higher (or trial), (2) tenant-level admin setting enabled for Copilot, and (3) user must have appropriate Fabric permissions. Copilot is not available on lower-tier capacities.

Click to flip back

Knowledge Check

Ingrid at Nordic Shield Insurance is evaluating GitHub Copilot for the database team. The company handles sensitive policyholder data subject to GDPR. Which concern should Ingrid raise FIRST?

Knowledge Check

Dev at PixelForge wants Copilot to always generate stored procedures with SET NOCOUNT ON, SET XACT_ABORT ON, and TRY...CATCH error handling. What is the best way to enforce this?

🎬 Video coming soon

Next up: MCP: Connecting AI to Your Database β€” connect AI agents to your SQL Server and Fabric databases using Model Context Protocol.

← Previous

Fuzzy String Matching: Finding Similar Text

Next β†’

MCP: Connecting AI to Your Database

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.