"Database Foundations" was retired on March 22, 2017. You are now viewing the recommended replacement.

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

Development Tools Database Foundations Installing MySQL Server and MySQL Workbench Running a Script and Using MySQL Workbench

(MySQL) Error: Error formatting SQL query: empty string given as argument for ! char

I am getting the following error message:

" 19:11:32 SELECT * FROM movies LIMIT 0, 1000 Error: Error formatting SQL query: empty string given as argument for ! character "

after running this command:

SELECT * FROM movies ;

How can I get this command to work properly?

2 Answers

Hi Dan,

According to this post on Stack Overflow, you may not have your database selected. In the left panel, try double-clicking the database you want to use (it will be bold when selected), then run your query again.

Hope that helps!

That worked. Thanks Shawn!

Thanks! Had the same problem

Woohoo! Love a simple answer.

thanks!

Hi I'm not sure how many records are in that table but you might try upping your LIMIT and using the schema name: SELECT * FROM treehouse.movies LIMIT 0, 2000;

Thank you, Shawn. This worked for me as well... Lots of interesting little challenges here with the differences between the videos and what we see with the latest version of MySQL.