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 trialJudy Mosley
11,910 PointsIF NOT EXISTS - Not working
I'm trying to accomplish task two and I don't know what I'm missing.
CREATE SCHEMA movie_db;
CREATE DATABASE IF NOT EXISTS movie_db;
3 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHey Judy,
Your code is correct, just duplicated (and the code checker is fussy).
The second task wants you to modify the code you wrote in the first task, so the finished code for Task 2 will be just one line of code in the window. If you delete the first line there, the code will pass.
Incidentally, either SCHEMA or DATABASE will work for both / either question.
Hope that helps. Keep Coding! :)
eduardomejia2
Courses Plus Student 22,237 PointsYou just need to update your first statement to check if the schema exists or not.
CREATE SCHEMA IF NOT EXISTS movie_db;
Judy Mosley
11,910 PointsI tried it but it but it's still not working.
Judy Mosley
11,910 PointsJudy Mosley
11,910 PointsOh!!! I understand what you're saying. Hold on. Let me try it.
Judy Mosley
11,910 PointsJudy Mosley
11,910 PointsIt worked!! Thanks for clarifying that for me.