
SQL Query and Constraint Quiz
Quiz
•
Engineering
•
University
•
Easy
mohammed ahmed
Used 3+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query inserts a new student into the semestermarks table with all columns?
INSERT INTO semestermarks VALUES ('Ali', 101, 89, 3);
INSERT semestermarks (Ali, 101, 89, 3);
INSERT INTO semestermarks (Ali, 101, 89);
PUT INTO semestermarks VALUES ('Ali', 101, 89, 3);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these updates the semester of rollnumber 202540 to 4?
UPDATE semestermarks SET 4 TO semester WHERE rollnumber = 202540;
UPDATE semestermarks SET semester = 4 WHERE rollnumber = 202540;
MODIFY semester = 4 FROM semestermarks WHERE rollnumber = 202540;
CHANGE semestermarks SET semester TO 4 WHERE rollnumber = 202540;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which constraint prevents null entries in a column?
DEFAULT
UNIQUE
NOT NULL
PRIMARY
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query will fetch records where marks are above 70?
SELECT * FROM semestermarks WHERE marks > 70;
SELECT * FROM semestermarks HAVING marks > 70;
SELECT marks FROM semestermarks IF marks > 70;
GET * FROM semestermarks WHERE marks > 70;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function returns total marks in the semestermarks table?
COUNT(marks)
AVG(marks)
SUM(marks)
MAX(marks)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query groups the employees by department and returns average salary?
GROUP BY employee SELECT dept, AVG(salary);
SELECT AVG(salary), dept FROM employee;
SELECT dept, AVG(salary) FROM employee GROUP BY dept;
SELECT dept FROM employee GROUP salary BY;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword allows you to check if a column value exists in a list?
IN
EXISTS
WHERE
ANY
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Understanding Anesthesia and Gases
Quiz
•
University
20 questions
Feature Engineering And EDA
Quiz
•
University
20 questions
DataScience-28 & 29
Quiz
•
University
20 questions
Dive in SQL
Quiz
•
University
20 questions
Combinational Logic Circuits
Quiz
•
University
25 questions
Gen-Z's Trailblazers -2k25 2
Quiz
•
University
20 questions
quiz3_07/08/2025
Quiz
•
University
20 questions
FE in ME303P3
Quiz
•
University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Engineering
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
7 questions
Central Idea of Informational Text
Interactive video
•
4th Grade - University
7 questions
Review for You: Using Commas
Interactive video
•
4th Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
Safari Scholar: Searching for Subject-Verb Agreement
Interactive video
•
4th Grade - University
