0
0
SQLquery~30 mins

SQL statement categories (DDL, DML, DQL, DCL) - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding SQL Statement Categories: DDL, DML, DQL, DCL
📖 Scenario: You are working as a junior database assistant in a small company. Your manager wants you to organize and understand different types of SQL statements so that you can use them correctly when managing the company database.
🎯 Goal: Build a simple SQL script that categorizes example SQL statements into the four main categories: DDL, DML, DQL, and DCL. You will create tables, insert data, query data, and control access using the correct SQL commands for each category.
📋 What You'll Learn
Create a table using a DDL statement
Insert data into the table using a DML statement
Query data from the table using a DQL statement
Grant permission using a DCL statement
💡 Why This Matters
🌍 Real World
Organizing SQL statements into categories helps database administrators and developers understand how to manage data and structure safely and efficiently.
💼 Career
Knowing SQL categories is essential for roles like database administrators, backend developers, and data analysts to perform their tasks correctly.
Progress0 / 4 steps
1
Create a table using a DDL statement
Write a SQL statement to create a table called Employees with two columns: EmployeeID as an integer and Name as a variable character string of length 50. Use the correct DDL command.
SQL
Need a hint?

DDL commands are used to define or change database structures. To create a table, use CREATE TABLE.

2
Insert data into the table using a DML statement
Write a SQL statement to insert a new employee with EmployeeID 1 and Name 'Alice' into the Employees table. Use the correct DML command.
SQL
Need a hint?

DML commands are used to add or change data. To add a row, use INSERT INTO.

3
Query data from the table using a DQL statement
Write a SQL statement to select all columns and rows from the Employees table. Use the correct DQL command.
SQL
Need a hint?

DQL commands are used to read data. To get all data from a table, use SELECT * FROM.

4
Grant permission using a DCL statement
Write a SQL statement to grant SELECT permission on the Employees table to a user named guest_user. Use the correct DCL command.
SQL
Need a hint?

DCL commands control access. To give permission, use GRANT.