[Note: I have another of this “series” on stand-by, but it’s long and slightly complicated, so it made sense to me to post this one first.]
I’ve recently upgraded my developer workstation to SQL Server 2008 (from 2005). For me the killer feature, hands-down, is IntelliSense. Of course, there’s still room for improvement:
Great. How about telling me what I can never remember without firing up the documentation, namely which “expression” is the thing I’m searching for and which is what I’m searching in? Oh well, they’ll probably address this sooner or later. Then there is this: How can IntelliSense be provided for field names when you haven’t specified the source? It can’t, of course. If you want IntelliSense for field names you can type something like “select from tableA as a [join tableB as b]…” then go back and complete the “select” clause. I know I should be grateful, but I find this mildly annoying.
LINQ doesn’t have this problem because…“from” comes first.
IntelliSense is not the only reason I prefer that “from” come first. The biggest reason is the way that I think about queries. Basically, I think of them as a pipeline, with data flowing from one end to the other, getting transformed and filtered along the way:
Coincidentally, this is pretty much the same order of elements in a LINQ query.
Granted, putting the “select” clause first does put SQL slightly closer to natural English sentence construction. Does that make SQL easier to understand? I think not.

0 comments:
Post a Comment