First page Back Continue Last page Image

How Should You Write SQL Statements?

SQL is not case sensitive so you can write the code in lower case, upper case or some combination and it should work, HOWEVER...

Adopting a few simple conventions now will make you a better SQL developer

1) Write SQL Keywords in Upper Case

2) Write things like field names and table names in consistent lower case or camel notation

3) Use Comments in your Code

On page 32 the author of the book implies SQL comments are not that necessary -- I disagree and will be grading accordingly

- - This is a single line comment

/* This is a block comment and can

go for multiple lines */