Version Control For Database Objects: Why Visual Studio and TFS are a killer combo

Awhile, back I answered a LinkedIn question on version control for database objects.  After continuing to use Visual Studio for Database projects for an additional four years since the original question was asked, my answer remains the same.

SQL: Create Schema If Not Exists

When deploying code I try to create my scripts so they can be rerun without an error being thrown (e.g. "object already exists").  There's some fancy word for this that I used to try and use so as to appear ostentatious but it turns out people found me ostentatious even when I didn't use the… Continue reading SQL: Create Schema If Not Exists

Compare a Row to the MAX of Multiple Columns and Multiple Rows: The Easy Way

Alright.  MAX on rows *and* columns.  This was a bit of a mind bender.  A fellow SQL Server Developer was wondering if it was possible to find the MAX and MIN values of multiple rows and columns and then compare it to a value on a single row.  Of course this could be done by… Continue reading Compare a Row to the MAX of Multiple Columns and Multiple Rows: The Easy Way