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 Deleting Data From a Database Review and Practice

We've removed the reviews section from our website. Please remove all reviews. DELETE FROM reviews WHERE review = ??

I tried several conditions and I still have trouble figuring out how to delete the review column only. Rewatching the video to this question did not help. I was able to do the other 3 SQL Playground questions but this one stumped me.

4 Answers

Hi Eric,

It's asking you to remove all the rows from the table. Each row represents a review. So in order to remove a review, you have to delete the entire row. Not just the text of the review.

So for this query, you don't need the WHERE condition.

I think you are thinking too deep into the question. He is only asking to remove Reviews from the database not the reviews column

delete from reviews;

I realized the syntax is: DELETE <column name> FROM <tablename>;

Yes, this one was tricky.

Delete from reviews;

You did not require the where clause here as you want to delete all the records. This can be rolled back as delete is not auto commited.