Зміст курсу
Introduction to SQL
Introduction to SQL
Challenge: Correct Book's Data
The library staff discovered an error in the database for the books
table. A recently added book has incorrect information, and you need to update it.
Specifically:
The book with book_id = 5
currently has the title 'The Greatest Gatsby'
. However, the title was entered incorrectly, and it should be updated to 'The Great Gatsby'.
Additionally, this book's is_available
status is incorrect and should be set to FALSE
because it has been lent out.
Swipe to show code editor
Your task is to write an UPDATE
statement to correct this information in the books
table.
The syntax of the UPDATE
statement is:
Рішення
Дякуємо за ваш відгук!
Challenge: Correct Book's Data
The library staff discovered an error in the database for the books
table. A recently added book has incorrect information, and you need to update it.
Specifically:
The book with book_id = 5
currently has the title 'The Greatest Gatsby'
. However, the title was entered incorrectly, and it should be updated to 'The Great Gatsby'.
Additionally, this book's is_available
status is incorrect and should be set to FALSE
because it has been lent out.
Swipe to show code editor
Your task is to write an UPDATE
statement to correct this information in the books
table.
The syntax of the UPDATE
statement is:
Рішення
Дякуємо за ваш відгук!