Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Databases Modifying Data with SQL Updating Data in a Database Update All Rows or Columns in a Table

Kevin Haller
Kevin Haller
5,940 Points

UPDATE books SET title="test", author="test2"; Error: disk I/O error Refreshing the browser doesn't help.

Could the error code be related to refreshing the URL? Thank you!

1 Answer

Patrik Horváth
Patrik Horváth
11,085 Points

your SQL is Okey so try use your Own Database on your PC using XAMP / WAMP / MAMP because it looks like you use SQL Lite in workspace with errors are little bit confusing

there can be a lot of solutions for example SQL is out of Free Space, ... and a lot of more this should not happend in Real SQL server

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
WARNING ALL VALUES WILL BE CHANGED ! 
UPDATE table_name
SET column1 = value1, column2 = value2, ...

also you can try ".log stderr" before your SQL code i dont think it will work in workspace