Welcome to the Treehouse Community
Looking to learn something new?
Brian Schmitz11,167 Points
Why am I getting an error for the following:
when I try to pull up the treehouse_movies database as follows:
SELECT * FROM actors; or movies;
I get an error that says "Error formatting SQL query, empty string given as an argument for ! character"
I'm using SQL version 5.6.21. I followed the download instructions in the video.
Semicolon in the middle of sql query?
I'm no SQL expert but I haven't seen or in an SQL statement before. Anyhow, you actually have two statements there. A semicolon tells SQL that the statement has ended. So SQL SELECTs all FROM the actors table and the sees the statement or movies; and doesn't know what to do. Also, make sure you are using the database, USE treehouse_movie_db;.
I have to ask. Is this a code challenge? Did you create the database? Also, before performing the query did you enter the command USE treehouse_movie_db;?
Thank you Jeff for your help, in fact in the movie it isn't told to write "USE treehouse_movie_db;" and that was the problem.