Introduction to SQL DDL, DML, DCL, and TCL Quiz

RiskFreeSamarium avatar
RiskFreeSamarium
·
·
Download

Start Quiz

Study Flashcards

16 Questions

What does DDL stand for in SQL?

Data Definition Language

Which SQL command is used to permanently remove a table and its data?

Drop

What does DML stand for in SQL?

Data Manipulation Language

Which SQL command is used to make a temporary backup of the current state of a transaction?

Save Point

In SQL, which constraint is used to ensure that a column does not contain any duplicate values?

Unique

What does DCL stand for in SQL?

Data Control Language

What is the result of the SQL query: Select Emp_Name From Employees Where Emp_ID = 2 ?

Amal

In the SQL query: Select * From Employees Where Not Nationality = 'Egyptian', what does the 'Not' operator do?

Retrieves records where the nationality is not Egyptian

What does the SQL query: Select Emp_ID , Emp_Name , Salary From Employees Where Emp_ID IN (1 , 3 , 5) retrieve?

Employee ID, Name, and Salary for employees with IDs 1, 3, and 5

What is retrieved by the SQL query: Select * From Employees Where Emp_Name IN ('Ali' , 'Omar' , 'Amal')?

Records for employees named Ali, Omar, or Amal

What does the SQL query: Select * From Employees Where Emp_Name Like 'A%' retrieve?

Records for employees whose name starts with 'A'

What is retrieved by the SQL query: Select * From Employees Where Emp_Name Like 'Z%B'?

Records for employees whose name starts with 'Z' followed by a single character and then 'B'

What is retrieved by the SQL query: Select * From Employees Where Emp_Name Like 'Al_'?

Records for employees whose name contains 'Al' followed by a single character

In the SQL query: Select Emp_Name , FUN , Address From Employees Where Phone Is Null, what does 'Phone Is Null' represent?

'Phone' field has no data

What is the result of the SQL query: Select Emp_ID , Emp_Name , Salary From Employees Where Salary Between 4000 And 6000 ?

(5, Ali, 4000), (8, Aly, 4500), (2, Amal, 5000), (3, Mona, 6000)

What is the result of the SQL query: Select Max (Salary) as Max , Min (Salary) as Min , Avg (Salary) as Average From Employees ?

(Max: 7000, Min: 3000, Average: 4500)

Test your knowledge of SQL Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL) with this quiz. Topics such as Create, Drop, Truncate, Rename, Alter, Comments, Insert, Delete, Update, Select, Grant, Revoke, Commit, Rollback, and more are covered.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

The 'Atmation' Quiz
6 questions

The 'Atmation' Quiz

CleverWaterfall avatar
CleverWaterfall
SQL DDL vs DML Commands Quiz
12 questions
DML Commands in SQL Quiz
5 questions
SQL Database Management
279 questions

SQL Database Management

CongenialCopernicium avatar
CongenialCopernicium
Use Quizgecko on...
Browser
Browser