Do you know this FACTOID about Foreign Key Constraints in SQL Server?

Reading Time: 3 minutes There is an interesting factoid you should know when it comes to working with foreign key constraints in SQL Server. Normally, foreign key constraints are linked to a Primary Key column in a parent table Take a look at the following Books and BookSales tables: CREATE TABLE Books ( BookID Continue Reading

How to make a column NOT NULL in SQL Server: Explained with Examples

Reading Time: 3 minutes You may find yourself needing the change the definition of a table or column from time-to-time while working as a database professional. One change you may need to make is changing a column from nullable to non nullable. It may have been decided that we actually don’t want NULL to appear Continue Reading

Difference between unique constraints and primary key constraints: Answered with examples

Reading Time: 4 minutes A primary key constraint and a unique constraint are both meant to enforce uniqueness in column(s). Since that’s true, it begs the question: What’s the difference? In this very brief tutorial, we’ll discuss the two main differences between primary key constraints and unique constraints. Difference # 1: Primary key constraints Continue Reading

How long can a table name be? Learn this “factoid” and more!

Reading Time: 2 minutes There are many, many details one can learn about Microsoft SQL Server over a very long career in data science. This blog, with over 120 posts, only begins to scratch the surface! In this weeks tutorial, I’d like to talk about just a few unique factoids you might find interesting: Continue Reading