Course Content
Introduction to SQL
Introduction to SQL
Challenge: 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.
Swipe to show code editor
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:
Solution
Thanks for your feedback!
Challenge: 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.
Swipe to show code editor
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:
Solution
Thanks for your feedback!