DP-800 is Microsoft's associate-level exam for the SQL AI Developer Associate certification, testing your ability to design, secure, and AI-enable database solutions across Microsoft SQL Server, Azure SQL, and SQL databases in Microsoft Fabric. It is a 120 minute proctored exam split across three domains: designing and developing database solutions with advanced T-SQL and AI-assisted tooling (35-40%), securing, optimizing, and deploying those solutions through CI/CD and Azure integration (35-40%), and implementing genuinely new AI capabilities such as embeddings, vector search, and retrieval-augmented generation directly inside the database engine (25-30%). The exam leans hard on syntax you actually have to write, from window functions and JSON path expressions to the exact system stored procedure that calls an external model from T-SQL, so this sheet favors concrete commands and configuration over abstract description. Skills measured as of March 12, 2026.
What This Cheat Sheet Covers
This topic spans 26 focused tables and 263 indexed concepts, 254 flashcards, 8 practice tests with 333 questions. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Table Design Fundamentals: Data Types, Indexes, Constraints & Sequences
Covers the DP-800 "Design and implement database objects" task area: sizing columns and choosing data types, building rowstore and columnstore indexes, enforcing data integrity with PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, and DEFAULT constraints, and generating values with SEQUENCE objects.
| Concept | Example | Description | |
|---|---|---|---|
nchar(10) stores 10 characters from the common Unicode range (0 to 65,535), but fewer once Supplementary Characters (two byte-pairs each) appear | • In nchar(n)/nvarchar(n), n sets the string length in byte-pairs, not a guaranteed character count.• nvarchar(max) skips the 4,000 byte-pair cap for widely varying, very long text. | ||
Two columns, varchar(7000) and varchar(2000), each stay under 8,000 bytes alone but together can push a row past the limit | • A row's data plus overhead is capped at 8,060 bytes; the engine dynamically moves the widest overflowing varchar/nvarchar/varbinary column to a ROW_OVERFLOW_DATA page.• LOB types like varchar(max) are exempt from the limit. | ||
CREATE UNIQUE CLUSTERED INDEX IX_Employee_ID ON dbo.Employee(EmployeeID) physically sorts the table by EmployeeID | • Sorts and stores the table's data rows by the index key; only one clustered index per table, since rows can only be physically ordered one way. • Without one, the table is stored as an unordered heap. | ||
CREATE INDEX IX_Address_PostalCode ON Person.Address(PostalCode) INCLUDE (City) lets a query on PostalCode and City read the index alone | • A nonclustered index that adds nonkey (included) columns to its leaf level so a query is fully satisfied from the index, avoiding a lookup on the base table. • LOB types can't be key columns but can be included columns. | ||
A 20 GB fact table stored as a clustered columnstore index typically shrinks about 10 times, cutting storage and scan I/O | • Becomes the primary storage for the whole table in a column-wise format; the standard choice for large data warehouse fact and dimension tables scanned by analytic queries. • New rows land in a rowstore deltastore until they're compressed in. | ||
Adding a nonclustered columnstore index to an OLTP orders table lets analysts scan sales trends while order entry keeps using the rowstore clustered index | • A secondary columnstore layered on a rowstore (or memory-optimized) table so analytics run in real time on transactional data, without a separate warehouse. • Best when updates and deletes touch under about 10% of rows; heavier write churn favors a rowstore index instead. | ||
EmployeeID INT PRIMARY KEY CLUSTERED uniquely identifies each row and, by default, becomes the table's clustered index | • Enforces entity integrity by guaranteeing a unique, non-null value (or combination, for a composite key) per row; one per table, capped at 32 columns and 900 bytes of total key length. • Defaults to CLUSTERED unless a clustered index already exists or NONCLUSTERED is specified. | ||
FOREIGN KEY (SalesPersonID) REFERENCES SalesPerson(SalesPersonID) ON DELETE CASCADE removes matching order rows whenever the referenced salesperson row is deleted | • Requires every value in the referencing column to already exist in the referenced table's PRIMARY KEY or UNIQUE column, protecting referential integrity. • Default action is NO ACTION (blocks the parent change); CASCADE, SET NULL, and SET DEFAULT are opt-in, and no index is created automatically. | ||
ALTER TABLE Employee ADD CONSTRAINT UQ_Email UNIQUE (Email) blocks a second row from reusing the same email address | • Enforces uniqueness on a column (or columns) that isn't the primary key, via an automatically created nonclustered unique index. • Unlike PRIMARY KEY, it allows NULL, but only one NULL per column. | ||
CHECK (salary >= 15000 AND salary <= 100000) rejects any row where salary falls outside that range | • Enforces domain integrity with any Boolean expression evaluated row by row. • A CHECK on a table with zero rows always evaluates TRUE, and CHECK constraints are never validated by DELETE statements. | ||
Status VARCHAR(20) DEFAULT 'Pending' fills in 'Pending' automatically whenever an INSERT omits the Status value | • Supplies a constant, NULL, or scalar-function value only when a column is left out of an explicit INSERT.• Can't be combined with an IDENTITY column, and is dropped automatically if the table is dropped. | ||
ALTER TABLE Orders WITH NOCHECK ADD CONSTRAINT FK_Cust FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID) adds the FK without checking existing rows | • Controls whether a newly added or re-enabled FOREIGN KEY or CHECK constraint is validated against existing data. • WITH CHECK is assumed for a brand-new constraint; the query optimizer ignores a constraint left WITH NOCHECK until it's re-verified. | ||
CREATE SEQUENCE Test.OrderSeq AS INT START WITH 1 INCREMENT BY 1 CACHE 20 hands out cached integers to callers of NEXT VALUE FOR | • A schema-bound object that generates numbers per its own definition (start, increment, min/max, cycle, cache), independent of any table. • Defaults to NO CYCLE and CACHE; a hard shutdown can lose cached-but-unused values, leaving gaps. | ||
One CREATE SEQUENCE Audit.EventCounter object can feed unique numbers into three separate tables (ProcessEvents, ErrorEvents, StartStopEvents) | • Unlike an IDENTITY column, a SEQUENCE isn't tied to a single table; an application calls NEXT VALUE FOR to get a number before the INSERT even runs, and one sequence can be shared across many tables.• Only one IDENTITY column is allowed per table, with no such sharing. |