Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Lester Tay
Lester Tay
416 Points

Using SQL to find out all columns containing empty cells

This is a question from SQL basics but I can't seem to return to the course upon completion (can anyone teach me how to do it?)

Also, would like to ask if we want to use SQL to find out all the columns with empty cells, do we type: SELECT * FROM <sheet> WHERE <column 1> IS NULL OR <column 2> IS NULL ….<column n> IS NULL; ???

Seems like an ineffective method to me especially if there are many columns.

Thank you very much.

1 Answer

Steven Parker
Steven Parker
216,057 Points

From your home page, if you select "Completed" on the courses bar you should then be able to select any course you've finished and re-enter it.

Your code for selecting rows with empty columns seems correct and would probably be reasonably efficient even if the code itself is somewhat verbose. SQL is often like that.