SQL Query and Constraint Quiz

SQL Query and Constraint Quiz

University

25 Qs

quiz-placeholder

Similar activities

Unmanned Aircraft System Quiz

Unmanned Aircraft System Quiz

9th Grade - University

25 Qs

Quiz Industrial Training Preparation: Session 1 & 2

Quiz Industrial Training Preparation: Session 1 & 2

University

30 Qs

22ME503_BPLM_Activity

22ME503_BPLM_Activity

University

30 Qs

UNit 1 Properties of Matter

UNit 1 Properties of Matter

University

30 Qs

SENA BD CIA

SENA BD CIA

3rd Grade - University

20 Qs

National Youth Day Celebration Focusing on SDG 4 & 8

National Youth Day Celebration Focusing on SDG 4 & 8

University

20 Qs

Introduction to Applied Engineering Assessment

Introduction to Applied Engineering Assessment

11th Grade - University

20 Qs

Preguntas sobre SQL y C#

Preguntas sobre SQL y C#

University

20 Qs

SQL Query and Constraint Quiz

SQL Query and Constraint Quiz

Assessment

Quiz

Engineering

University

Practice Problem

Easy

Created by

mohammed ahmed

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?