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

PHP

Javi Pérez
Javi Pérez
7,642 Points

I think there is an error on a database challenge

When I have done the last two challenges from database foundations, I have passed them without writing semicolon at the end. Like this:

CREATE TABLE actors (name VARCHAR(50))

and

INSERT INTO actors VALUE("Name of the film")

Is it correctly and it will work? Or I should put ; at the end of te code?

Thanks!

2 Answers

Best to always have that semicolon, in my own opinion!

Javi Pérez
Javi Pérez
7,642 Points

Okey, thanks. I think that the challenge does not correct properly.

I agree, it is definitely best to always use a semicolon at the end of each statement - however if you are just sending one statement you can leave it out without it causing an error.

Javi Pérez
Javi Pérez
7,642 Points

Yes! I have read about it and I prefer to add the semicolon always, even thought it is unnecessary. Thanks!