Which of these SQL coding styles is better and why?
Comma first:
SELECT Name
, Email
, Phone
FROM Contact
Comma last:
SELECT Name,
Email,
Phone
FROM Contact
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Both are valid, do what you or your shop does consistently. I prefer method 2. Visually at first glance the first one appears to be missing a comma, only after you look some more do you notice that its fine. Readability for others is key.