development

SELECT INTO and non-nullable columns

SQL Server
22 Comments
SELECT…INTO  is one of my favorite SQL Server features. It’s great for creating table skeletons with false WHERE clauses (1=2), moving a real table to a staged/temp location for testing, etc. In SQL Server 2014 It acquired the ability to go parallel, which is pretty neat, but that’s not what we’re talking about here. It…
Read More

CTEs, Inline Views, and What They Do

SQL Server
10 Comments
By now, you have probably heard of CTEs And you may have even heard them referred to as Inline Views. Really, an Inline View can be any type of derived table. It’s very easy to illustrate when one may turn into a performance problem with CTEs, if you aren’t careful. A lot of people think…
Read More

Trade Offs: Code Quality

SQL Server
1 Comment
What has two thumbs and is talking about code quality at SQL in the City Seattle? Nearly every day, we’re faced with a decision about quality and time. Do you write quick and dirty code or do you take the time to get it right? Your decision is going to last a lot longer than…
Read More