Mastering Basic SQL Commands

Mastering Basic SQL Commands

10th Grade

14 Qs

quiz-placeholder

Similar activities

Tarkie Seminar for Disers

Tarkie Seminar for Disers

9th - 12th Grade

10 Qs

ÔN TẬP BÀI 3

ÔN TẬP BÀI 3

7th - 12th Grade

16 Qs

Kod Arahan

Kod Arahan

9th - 11th Grade

16 Qs

SHEET QUIZ

SHEET QUIZ

9th - 12th Grade

15 Qs

Week 3 Summative

Week 3 Summative

7th - 10th Grade

15 Qs

Word basics

Word basics

8th - 12th Grade

10 Qs

Online Databases vs. Search Engines

Online Databases vs. Search Engines

6th - 10th Grade

10 Qs

Symbols & Num. Keypad

Symbols & Num. Keypad

1st - 12th Grade

10 Qs

Mastering Basic SQL Commands

Mastering Basic SQL Commands

Assessment

Quiz

Computers

10th Grade

Practice Problem

Medium

Created by

Mrs Milliner

Used 21+ times

FREE Resource

AI

Enhance your content in a minute

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

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.

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?