Categories
T-SQL Tuesday

T-SQL Tuesday #194 – Learning from Mistakes

Part of the joy of new experiences is making mistakes and learning from them. For this month’s invitation, Louis Davidson asks us to share one of those mistakes to help others learn. The lesson I learned: don’t let order become meaning TL;DR: Don’t reuse numeric sequences for things they’re not designed for. With the prevalence of identity columns on tables, it […]

Categories
SQL

Schema Design for Bit Flags

When designing a data schema to store a variety of entities it can be common to require a selection of flags to be stored. There are different ways in which the data can be designed to accommodate this which I wanted to look at here. Examples of these fields could be an ‘Is Active’ flag […]

Categories
SQL Server

Boolean Value Storage

Within SQL Server we can store Boolean data using the BIT data type. This value is a single bit which will store a True or False (or null) value. However if you dive a little deeper with the data type it’s actually a little less clear cut in terms of the storage needed for this data type. […]