Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

Modifying Data and SQL, Help needed.

Challenge Task 1 of 2

We have an eCommerce database and it has a products table. It has the columns id, name, description and price.

The warehouse is closing down. There's a clearance sale and all products need to be priced 0.99.

I've tried multiple variables with no success, can someone post the answer to help me figure this out. Apparently I'm not understanding this.

Steven Parker
Steven Parker
231,271 Points

At least please give it a good-faith attempt, and be sure to show your code and provide a link to the course page you are working with if you are still having trouble.

If you're totally lost, you may want to review one or more of the videos.

Jeffrey Oelkers
Jeffrey Oelkers
22,336 Points

This quiz at: https://teamtreehouse.com/library/modifying-data-with-sql/updating-data-in-a-database/updating-data-with-sql ... has thrown me as well.

My answer was: UPDATE products SET price = 0.99;

I don't get why this doesn't work. All of the previous exercises in the SQL series have seemed perfectly simple up until this. This one seemed simple too, so it seems there is either some obvious detail I (and the original poster) are missing, or there is a glitch in the quiz validation.

6 Answers

I was a bit frustrated initially, not so much now. I doubt I will ask for help again, rather it is unlikely statistically speaking. I generally have to be pretty well beside myself to ask for help because of senseless answers like "Watch the video and/or watch the video(s) again" The assumption that I didn't watch the video(s) or didn't pay attention is belittling and I'd rather not deal with time wasting responses. For those of you who know all the nuances of this stuff, yeah the answer is in plain sight, for others like me, not so much. I could have watched the video(s) 30-40 times and it still wouldn't have registered. I will concede this, perhaps I should have worded my last comment about posting the "answer" to something more appropriate such as "Can someone please post the "formula," so I can work out the answer." I'm sure my wording contributed to the wrongful perception-freebies, I don't want freebies. Offering the formula would have put me on the right track. Digressing, if myself or others are asking for help I don't ever see the answer as being to watch the video(s) again... Me, I'd just rather not get a response at all.

Steven Parker
Steven Parker
231,271 Points

As I said, you would probably not be advised to watch the videos again (certainly not by me) if you remember to show your code and provide a link to the course page when asking a question. You'll also notice that suggestion was not posted as an answer, just a comment.

Amber Touch
Amber Touch
2,339 Points

Amen, I know exactly how you felt here. Super frustrating.

UPDATE products SET price=0.99

Come on guys you could of just told him, we should be understanding cos everyone overthinks sometimes

Please, I don't need advice telling me to re-watch the video(s). I need to see what I am doing wrong. This is why I detest asking anything in help channels.

Here's what I was overthinking....

UPDATE products SET price = 0.99;

moving on....

Steven Parker
Steven Parker
231,271 Points

That looks like it would work, doesn't it?

But you still forgot to provide a link to the challenge page.

If you remember to show your code and provide a link to the course page, you can generally expect a rapid pertinent response. The advice to watch the videos will generally be a last resort when the info needed to make an analysis is missing.

Jeffrey Oelkers
Jeffrey Oelkers
22,336 Points

I had the same problem with this exercise as the OP, as noted in my comment above. I went back to the quiz some minutes later and input the same answer pasted into my comment (UPDATE products SET price = 0.99;). It was accepted this time. Odd.

Mary-Ann Burton
Mary-Ann Burton
15,834 Points

All the variables are in the description provided, as with all thr challenges in the beginner SQL course. The structure for the answer is shown in the previous video. Those are the best hints I can give :)