Telling Similar SQL Features Apart
Many DP-800 questions place two similar features side by side. This lesson collects the most common pairs and the requirement that indicates each one.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish between commonly confused database features.
- Distinguish between the AI and tooling features used in database solutions.
Commonly confused pairs
The following table lists feature pairs that exam questions often place side by side, with the requirement that indicates each. Use it after studying the modules to check that you can explain every distinction.
| Requirement | Choose | Not |
|---|---|---|
| Point-in-time queries of past row versions | Temporal table | Ledger table |
| Proof that data was not tampered with | Ledger table | Temporal table or auditing |
| One number series shared by tables, known before insert | SEQUENCE | IDENTITY |
| Administrators must never see plaintext | Always Encrypted | TDE or Dynamic Data Masking |
| Hide part of a value from support staff | Dynamic Data Masking | Always Encrypted |
| Users see only their own rows | Row-Level Security | Dynamic Data Masking |
| Which rows changed since last sync | Change Tracking | CDC |
| Old and new values of every change | CDC | Change Tracking |
| Push changes to many consumers in near real time | Change event streaming | Polling with Change Tracking |
| Preview a deployment's changes | SqlPackage DeployReport or Script | Publish |
| Exact search on a small or filtered set | KNN with VECTOR_DISTANCE | ANN vector index |
| Fast search over millions of vectors | ANN with VECTOR_SEARCH and a vector index | KNN |
| Exact codes plus meaning in one search box | Hybrid search with RRF | Vector search alone |
| Fix a plan regression without code changes | Query Store plan forcing | Clearing the plan cache |
| Readers blocked by writers | RCSI or SNAPSHOT | NOLOCK |
Confusable features
AI and tooling pairs
The newer AI and tooling features also come in pairs, as the following table shows.
| Requirement | Choose | Not |
|---|---|---|
| Call an embedding model by name from T-SQL | CREATE EXTERNAL MODEL + AI_GENERATE_EMBEDDINGS | Hard-coded URLs in every procedure |
| Call a chat model from T-SQL | sp_invoke_external_rest_endpoint | AI_GENERATE_EMBEDDINGS |
| Split long text in T-SQL | AI_GENERATE_CHUNKS | STRING_SPLIT |
| Rules for every Copilot chat in a repository | .github/copilot-instructions.md | Personal instructions |
| Rules only for .sql files | .instructions.md with applyTo | Repository-wide file |
| Agents use selected tables safely | SQL MCP Server (DAB) | A generic run-any-SQL MCP tool |
| APIs over tables without custom code | Data API builder | A hand-written API |
| Pattern validation in a constraint | REGEXP_LIKE | LIKE |
| Similarity of misspelled names | JARO_WINKLER_SIMILARITY or EDIT_DISTANCE_SIMILARITY | SOUNDEX or LIKE |
AI and tooling pairs
Two plausible answers
A requirement states that support agents must see only the last four digits of a card number, while the fraud team sees full numbers, with no application changes. One option proposes Always Encrypted; another proposes Dynamic Data Masking with UNMASK for the fraud team. Which is correct?
Dynamic Data Masking with a partial() mask and UNMASK granted to the fraud team. It meets the display requirement without application changes. Always Encrypted protects data from administrators and requires application changes (an enabled driver and parameterized queries), and it cannot show the last four digits to one group and full values to another by itself. If the requirement had said that database administrators must not see card numbers, Always Encrypted would be the answer.
Which feature proves that rows were not altered, even by administrators?
Show answer
Ledger tables with digests stored outside the database.
Exam Tips
Remember for the exam
- History: temporal; tamper evidence: ledger.
- Hide from DBAs: Always Encrypted; hide on screen: Dynamic Data Masking; hide rows: RLS.
- Keys of changed rows: Change Tracking; values: CDC; push: change event streaming.
- Embeddings: external model functions; chat completions: sp_invoke_external_rest_endpoint.