WalzoneInterview Prep
📞 Interviewing soon? Practice with a realistic AI mock phone interview — it calls you, then scores you. First 15 min FREE →

Oracle Database · Basic · question 20 of 100

What is the difference between DDL, DML, and DCL statements in SQL?

📕 Buy this interview preparation book: 100 Oracle Database questions & answers — PDF + EPUB for $5

In SQL, DDL, DML, and DCL are three types of statements that are used for different purposes.

DDL (Data Definition Language) statements are used to define and modify the structure of database objects such as tables, views, indexes, and sequences. These statements include CREATE, ALTER, DROP, RENAME, and TRUNCATE. For example, the statement to create a table in SQL is a DDL statement:

CREATE TABLE my_table (
   column1 datatype1,
   column2 datatype2,
   ...
);

DML (Data Manipulation Language) statements are used to manipulate data in the database, such as inserting, updating, and deleting records. These statements include INSERT, UPDATE, and DELETE. For example, the statement to insert a record into the table created above is a DML statement:

INSERT INTO my_table (column1, column2, ...)
VALUES (value1, value2, ...);

DCL (Data Control Language) statements are used to control access to the database, such as granting or revoking privileges to users. These statements include GRANT and REVOKE. For example, the statement to grant a user access to a table is a DCL statement:

GRANT SELECT, INSERT, UPDATE, DELETE
ON my_table
TO my_user;

In summary, DDL statements are used to define and modify the structure of database objects, DML statements are used to manipulate data in the database, and DCL statements are used to control access to the database.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Oracle Database interview — then scores it.
📞 Practice Oracle Database — free 15 min
📕 Buy this interview preparation book: 100 Oracle Database questions & answers — PDF + EPUB for $5

All 100 Oracle Database questions · All topics