Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Mark Archived Books As Unavailable | Updating & Deleting Data
Introduction to SQL
course content

Course Content

Introduction to SQL

Introduction to SQL

1. Getting Started
3. Sorting Data
4. Populating a Database
5. Updating & Deleting Data

book
Challenge: Mark Archived Books As Unavailable

As you were going through the book records, you noticed that several older books are still marked as available, even though they are reserved for archival purposes. You need to update the is_available column to FALSE for all books that are:

  • Published before the year 1950;
  • Belong to the Historical Fiction or Classic genres.
Task
test

Swipe to show code editor

Your task is to write an UPDATE statement to modify multiple rows in the books table based on these conditions.

Note

The rows that are to be modified must match both of the conditions.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 4
toggle bottom row

book
Challenge: Mark Archived Books As Unavailable

As you were going through the book records, you noticed that several older books are still marked as available, even though they are reserved for archival purposes. You need to update the is_available column to FALSE for all books that are:

  • Published before the year 1950;
  • Belong to the Historical Fiction or Classic genres.
Task
test

Swipe to show code editor

Your task is to write an UPDATE statement to modify multiple rows in the books table based on these conditions.

Note

The rows that are to be modified must match both of the conditions.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 4
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt