Data Definition Language (DDL) Examples in Microsoft Azure Data Fundamentals

Data Definition Language (DDL) Examples

Question

Which statement is an example of Data Definition Language (DDL)?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D

Data Definition Language (DDL) statements defines data structures. Use these statements to create, alter, or drop data structures in a database. These statements include:

-> ALTER

-> Collations

-> CREATE

-> DROP

-> DISABLE TRIGGER

-> ENABLE TRIGGER

-> RENAME

-> UPDATE STATISTICS

-> TRUNCATE TABLE

-> INSERT

https://docs.microsoft.com/en-us/sql/t-sql/statements/statements

The correct answer is D. CREATE.

Explanation:

Data Definition Language (DDL) is a subset of SQL that is used to define the database schema and modify the structure of database objects such as tables, indexes, views, and procedures. It consists of commands that are used to create, alter, or drop database objects.

The statement "CREATE" is an example of Data Definition Language (DDL). This command is used to create database objects such as tables, indexes, views, and stored procedures. It defines the structure and attributes of the database objects.

A. "SELECT" is an example of Data Manipulation Language (DML) which is used to manipulate or retrieve data from existing database objects.

B. "JOIN" is also an example of Data Manipulation Language (DML) which is used to combine rows from two or more tables based on a related column between them.

C. "UPDATE" is an example of Data Manipulation Language (DML) which is used to modify existing records in a table.

D. "CREATE" is an example of Data Definition Language (DDL) which is used to create new database objects.

Therefore, the correct answer is D. CREATE.