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 trialTyler Brewer
1,871 PointsSQL Create Database Issue
I'm going through the SQL course and I've come across an issue that I can't seem to solve. The question requires the syntax to create a database is MySQL and this is the code that I am passing. I've double and triple checked the code to make sure there are no syntax errors and it doesn't seem that there are, yet I still am getting errors saying that the answer is not correct. Any ideas?
CREATE SCHEMA 'movie_db' ;
1 Answer
Christopher Stöckl
19,795 PointsHi Tyler!
You're not allowed to use quotation marks for your database name. So your command should look like this:
CREATE SCHEMA movie_db;
Tyler Brewer
1,871 PointsTyler Brewer
1,871 PointsThanks Christopher! Works great! Do you know why in the MySQL Workbench when you click 'New Schema' and review the SQL Script that they use single quotes around the database name?
Christopher Stöckl
19,795 PointsChristopher Stöckl
19,795 PointsPerfect :) No, sorry, I don't know why it shows up with quotation marks.
You can have a look in the official MySQL documentation about the correct syntax: https://dev.mysql.com/doc/refman/5.0/en/create-database.html