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 trialD Elis
13,571 PointsSQL Reporting by Example- WHY is every keyword in ALL CAPS??
I am on my way to finishing the Databases track.. and I'm currently almost finished with the SQL Reporting by Example course.
While I can understand almost everything in this course so far.. since Ben D. reviews all the SQL we already learned.. I am wondering why he chose to write his code the way he did.
Why would one opt to choose only capital letters for every single SQL keyword?
Doesn't this get redundant and hard to read (especially if there could be hundreds or thousands of rows of informationโฆ as Ben keeps telling us could be the case)..
Further, for a mass-instructional video like this.. shouldn't he emphasize the best SQL/coding practices for us to learn? Or at least reinforce all the SQL lessons that came before this that have ALL used careful case-sensitive lettering to distinguish between keywords?
Hope to hear some feedback if anyone has anything to say about this.. Cheers
2 Answers
Torben Korb
Front End Web Development Techdegree Graduate 91,433 PointsGood question! As far as I know, it's just a matter of preference and readability to write SQL keywords all uppercase. Once you handle many referenced tables in one long statement it's good to have a significant difference between data and keywords. For me this works out. Hope this helps you!
D Elis
13,571 Pointsthank you
D Elis
13,571 PointsD Elis
13,571 PointsWas this just to show how we might encounter other people's code in the workplace?