Mastering Basic SQL Commands

Mastering Basic SQL Commands

10th Grade

14 Qs

quiz-placeholder

Similar activities

Representing Instructions

Representing Instructions

8th - 11th Grade

14 Qs

مراجعة للتطبيق الثاني

مراجعة للتطبيق الثاني

10th Grade

13 Qs

2.3 Producing Robust Programs

2.3 Producing Robust Programs

10th Grade

12 Qs

Excel Ribbon

Excel Ribbon

6th - 12th Grade

10 Qs

SQL Quiz

SQL Quiz

10th Grade - University

10 Qs

SQL Programming

SQL Programming

4th Grade - Professional Development

10 Qs

MySQL Basic Syntax (Reviewer)

MySQL Basic Syntax (Reviewer)

10th Grade

10 Qs

Computer Basics

Computer Basics

5th - 10th Grade

15 Qs

Mastering Basic SQL Commands

Mastering Basic SQL Commands

Assessment

Quiz

Computers

10th Grade

Medium

Created by

Mrs Milliner

Used 20+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL statement is used to update the `age` of a student named 'Alice' in the `students` table to 16?

UPDATE students SET age = 16 WHERE name = 'Alice'

UPDATE students age = 16 WHERE name = 'Alice'

SET age = 16 WHERE name = 'Alice' IN students

MODIFY students SET age = 16 WHERE name = 'Alice'

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you delete a record from the `students` table where the `name` is 'Bob'?

DELETE FROM students WHERE name = 'Bob'

REMOVE FROM students WHERE name = 'Bob'

DELETE students WHERE name = 'Bob'

DELETE FROM students name = 'Bob'

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to update the `grade` to 'A' for all students in the `students` table who are 15 years old?

UPDATE students SET grade = 'A' WHERE age = 15

UPDATE students grade = 'A' WHERE age = 15

SET grade = 'A' WHERE age = 15 IN students

MODIFY students SET grade = 'A' WHERE age = 15

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you try to delete a record from the `students` table without a WHERE clause?

It will delete all records from the table.

It will delete the first record from the table.

It will return an error.

It will delete no records.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements will correctly update the `name` of a student with `id` 3 to 'David'?

UPDATE students SET name = 'David' WHERE id = 3

UPDATE students name = 'David' WHERE id = 3

SET name = 'David' WHERE id = 3 IN students

MODIFY students SET name = 'David' WHERE id = 3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you delete all students who have a NULL value in the `age` column?

DELETE FROM students WHERE age IS NULL

DELETE FROM students WHERE age = NULL

DELETE FROM students WHERE age EQUALS NULL

DELETE FROM students WHERE age NULL

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following SQL statement? `SELECT * FROM students WHERE age IS NOT NULL;`

It returns all rows with non-NULL `age` values.

It returns all rows with NULL `age` values.

It returns an error.

It returns all rows.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?