
Quiz - 2 ( DQL, DDL, DML, Joins and Set

Quiz
•
Computers
•
University
•
Medium
ARUN R
Used 1+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. Consider the following SQL statement:
SELECT COUNT(*) FROM student WHERE age > (SELECT AVG(age) FROM student);
The query returns the count of students older than the average age.
The query returns an error because subqueries cannot be used in the WHERE clause.
The query returns the average age of students.
The query fails because COUNT(*) cannot be used with subqueries.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following SQL query?
SELECT 10 / 0 FROM dual;
A) 0
B) NULL
C) Error: Division by zero
D) Infinity
0
NULL
Error: Division by zero
INFINITY
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. Which of the following constraints ensures that a column in a table cannot have NULL values?
UNIQUE
CHECK
NOT NULL
FOREIGN KEY
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4. Consider the relational schema:
Employee (EmpID, Name, Age, Department, Salary, ManagerID)
If we need to retrieve the names of employees who earn more than their respective managers, which SQL query is CORRECT?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5. Given the relation schema:
Flights (FlightNo, Source, Destination, Fare, AirlineID)
Which of the following SQL statements is incorrect?
SELECT DISTINCT Source FROM Flights;
SELECT * FROM Flights WHERE Fare = NULL;
SELECT * FROM Flights WHERE Fare IS NULL;
SELECT Source, Destination FROM Flights;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a DML statement?
INSERT
UPDATE
DELETE
CREATE
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7. The difference between UNION and UNION ALL is that:
UNION does not remove duplicates, while UNION ALL does
UNION removes duplicates, while UNION ALL does not
UNION is faster than UNION ALL
Both give the same result in all cases
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Web test

Quiz
•
University
20 questions
035_Cloud-specific Vulnerabilities – CompTIA Security+ –

Quiz
•
9th Grade - University
25 questions
My-SQL

Quiz
•
University
23 questions
SQLite

Quiz
•
4th Grade - University
20 questions
Insert, Delete data & using Images

Quiz
•
University
20 questions
Databases

Quiz
•
12th Grade - University
20 questions
Soal Perancangan Basis Data

Quiz
•
University
25 questions
SQL Quiz: 25 MCQs on the Student Table

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University