Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Updating Page Counts | Updating & Deleting Data
Introduction to SQL

bookChallenge: Updating Page Counts

The library discovered that some books in their database have incorrect page counts due to a data entry error. Specifically, for books published before the year 2000, the page count was mistakenly recorded 10 pages fewer than the actual number of pages.

Task

Swipe to start coding

Your task is to fix this error by updating the pages column in the books table. Increase the page count by 10 for all books where published before the year 2000.

You can reference a column value in an UPDATE statement like this:

UPDATE table_name  
SET column_name = column_name + value  
WHERE condition;

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 5. ChapterΒ 3
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Summarize this chapter

Explain the code in file

Explain why file doesn't solve the task

close

Awesome!

Completion rate improved to 1.72

bookChallenge: Updating Page Counts

Swipe to show menu

The library discovered that some books in their database have incorrect page counts due to a data entry error. Specifically, for books published before the year 2000, the page count was mistakenly recorded 10 pages fewer than the actual number of pages.

Task

Swipe to start coding

Your task is to fix this error by updating the pages column in the books table. Increase the page count by 10 for all books where published before the year 2000.

You can reference a column value in an UPDATE statement like this:

UPDATE table_name  
SET column_name = column_name + value  
WHERE condition;

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!

close

Awesome!

Completion rate improved to 1.72
SectionΒ 5. ChapterΒ 3
single

single

some-alt