This post is a part of the DP-900: Microsoft Azure Data Fundamentals Exam Prep Hub.
This topic falls under these sections:
Identify considerations for relational data on Azure (20β25%)
--> Describe relational concepts
--> Identify common Structured Query Language (SQL) statements
Note that there are 10 practice questions (with answers and explanations) for each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available on the hub below the exam topics section.
Understanding basic SQL statements is essential for working with relational data and is a key requirement for the DP-900 exam. You are not expected to be an advanced SQL developer, but you should recognize common SQL commands, their purpose, and when they are used.
What Is SQL?
Structured Query Language (SQL) is the standard language used to:
- Query data
- Insert new data
- Update existing data
- Delete data
- Define database structures
SQL is used across relational database systems, including Azure services like:
- Azure SQL Database
- Azure Database for PostgreSQL
- Azure Database for MySQL
Categories of SQL Statements
SQL statements are typically grouped into categories:
| Category | Purpose |
|---|---|
| DDL (Data Definition Language) | Define and modify database structures |
| DML (Data Manipulation Language) | Work with data in tables |
| DQL (Data Query Language) | Retrieve data |
| DCL (Data Control Language) | Manage permissions |
For DP-900, focus primarily on DDL, DML, and DQL.
1. Data Query Language (DQL)
SELECT
Used to retrieve data from a table.
SELECT Name, CityFROM Customers;
You can filter results:
SELECT NameFROM CustomersWHERE City = 'Seattle';
π‘ Key Points:
- Most commonly used SQL statement
- Can include filtering, sorting, and grouping
2. Data Manipulation Language (DML)
INSERT
Adds new rows to a table.
INSERT INTO Customers (Name, City)VALUES ('John', 'Seattle');
UPDATE
Modifies existing data.
UPDATE CustomersSET City = 'Austin'WHERE Name = 'John';
DELETE
Removes rows from a table.
DELETE FROM CustomersWHERE Name = 'John';
π‘ Important:
Always use a WHERE clause with UPDATE and DELETE to avoid affecting all rows.
3. Data Definition Language (DDL)
CREATE
Creates new database objects such as tables.
CREATE TABLE Customers ( CustomerID INT PRIMARY KEY, Name VARCHAR(100), City VARCHAR(50));
ALTER
Modifies an existing table.
ALTER TABLE CustomersADD Email VARCHAR(100);
DROP
Deletes a table or database object.
DROP TABLE Customers;
π‘ Warning:
DROP permanently removes the object and its data.
4. Additional Common SQL Clauses
WHERE
Filters rows:
SELECT * FROM OrdersWHERE Amount > 100;
ORDER BY
Sorts results:
SELECT * FROM OrdersORDER BY Amount DESC;
GROUP BY
Aggregates data:
SELECT City, COUNT(*)FROM CustomersGROUP BY City;
JOIN
Combines data from multiple tables:
SELECT Orders.OrderID, Customers.NameFROM OrdersJOIN CustomersON Orders.CustomerID = Customers.CustomerID;
π‘ DP-900 Tip:
You donβt need deep JOIN knowledge β just understand that JOINs combine related tables.
SQL in Azure
SQL is used across many Azure services:
Azure SQL Database
- Fully managed relational database
- Uses T-SQL (Microsoftβs SQL variant)
Azure Synapse Analytics
- Used for analytical queries on large datasets
Azure Database for PostgreSQL
- Uses PostgreSQL SQL dialect
Why This Matters for DP-900
On the exam, you may be asked to:
- Identify what a SQL statement does
- Match commands to their purpose (SELECT, INSERT, etc.)
- Recognize DDL vs DML
- Understand basic query concepts like filtering and sorting
Summary β Exam-Relevant Takeaways
β SELECT β Retrieve data
β INSERT β Add new data
β UPDATE β Modify existing data
β DELETE β Remove data
β CREATE / ALTER / DROP β Define and modify structures
β WHERE β Filter results
β ORDER BY β Sort data
β GROUP BY β Aggregate data
β JOIN β Combine tables
β SQL is the standard language for relational databases
Go to the Practice Exam Questions for this topic.
Go to the Additional Practice Questions for this topic.
Go to the DP-900 Exam Prep Hub main page.
