04 - Introduction to SQL, DDL, and DML (Video in Khmer)
Learn SQL basics, how DDL creates database tables, and how DML adds or changes data, with Khmer video lessons and practical tips.
2026-08-25 ยท 3 min read
Hello my friend! In this lesson, we learn some SQL basics. We see how to create a table with DDL, and how to add or change table data with DML. The video lessons are in Khmer.
What is SQL?
SQL means Structured Query Language. We use it to work with data in relational databases, such as MySQL, PostgreSQL, and SQL Server.
For example, SQL can create tables, add rows, update data, and find information.
Video: Introduction to SQL (6:51)
What is DDL?
DDL means Data Definition Language. DDL commands create or change the structure of a database, such as its tables.
CREATE TABLE makes a new table. This example creates a table for students:
CREATE TABLE students (
student_id INT PRIMARY KEY,
name VARCHAR(100),
age INT
);
Other common DDL commands include ALTER TABLE to change a table and DROP TABLE to remove a table. Be careful: dropping a table removes its structure and data.
Video: Create a Table with SQL (13:36)
What is DML?
DML means Data Manipulation Language. DML commands add or change rows in tables.
Use INSERT to add a row:
INSERT INTO students (student_id, name, age)
VALUES (1, 'Sokha', 20);
Use UPDATE to change a row. The WHERE condition selects which row to change:
UPDATE students
SET age = 21
WHERE student_id = 1;
Without a WHERE condition, an UPDATE can change every row in the table. Always check the condition before running it.
SELECTis often called DQL (Data Query Language), though some learning materials group it with data manipulation commands.
Video: INSERT and UPDATE Practice (10:53)
Tips
- Learn the difference: DDL changes table structure; DML works with table rows.
- Check your table and column names before running a query.
- Test
UPDATEcommands on sample data first, and use a clearWHEREcondition. - Back up important data before changing a database.
- SQL features and syntax can differ between database systems.