Currently Browsing: T-SQL

T-SQL missing comma in SELECT does not generate parsing error

I ran in to this “gotcha” the other day while writing a number of views. I omitted a comma on my SELECT statement, and the parser did not return an error, but rather just results that I did not expect. The problem is that SQL Server interprets the missing comma as an implied column name. It is as...