Reading Time: 6 minutes There may be times when you need to write a query and you need to make certain parts of that query dynamic, meaning the query might not be exactly the same every time you run it. SQL Server has a great tool we can use to create these dynamic queries. Continue Reading
The TOP 10 SQL Server String Functions You Should Know!
Reading Time: 8 minutes String manipulation is something you will likely find yourself doing at some point in your career as a database professional. Luckily, SQL Server has many great system functions we can use to make the task of string searching and manipulation very easy. In this week’s tutorial, we’ll cover the TOP 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
SQL Server DROP IF EXISTS: Explained with Examples
Reading Time: 4 minutes In SQL Server version 2016, Microsoft introduced an extremely handy tool called DROP IF EXISTS to make our database development lives so must easier. In this very brief tutorial, we’ll walk through the syntax of the DROP IF EXISTS tool and show you a few examples of how to use Continue Reading
How to disable a Foreign Key Constraint: Run this ONE simple statement!
Reading Time: 3 minutes Foreign key constraints are an excellent way to preserve the referential integrity of the data in your database. If you’re new to SQL Server and don’t fully understand what a foreign key is or how they work, make sure you check out the full beginner-friendly tutorial first to learn everything Continue Reading
SQL Server TRUNCATE TABLE: Everything you need to know
Reading Time: 6 minutes The TRUNCATE TABLE statement is a simple statement that has a very singular purpose in Microsoft SQL Server. In this very brief tutorial, we’ll cover all the important information you need to know about the TRUNCATE TABLE statement. We’ll cover these topics: What is the SQL Server TRUNCATE TABLE statement? Continue Reading
SQL Server Logical Query Processing Order: Explained!
Reading Time: 3 minutes When executing a query, SQL Server will process the different clauses of that query in a very particular order. Other programming languages like C++ or C# will process code in a top-down manner. SQL Server does not work that way. Take a look at the following two tables, Products and Orders: Using Continue Reading
SQL Server Temp Tables: A How-To Guide for Beginners
Reading Time: 7 minutes SQL Server temp tables are very useful tools available to us when it comes to querying and developing SQL Server databases. Temp tables offer a very easy way to create a table for a singular purpose and then remove that table when we are finished with it. In this very brief Continue Reading
SQL Server Sequence Object: Explained for Beginners
Reading Time: 7 minutes One of the most useful tools available to us in Microsoft SQL Server is the sequence object. Sequence objects are a great way to let SQL Server track and update an integer value that can be used to populate a primary key column. In this very brief tutorial, we’ll discuss Continue Reading
Do you know this IMPORTANT RULE about Foreign Key Constraints?
Reading Time: 5 minutes Foreign Key Constraints in Microsoft SQL Server are excellent for preserving the integrity of our data. We use a foreign key constraint to basically establish a parent-child relationship between two tables. A foreign key constraint will enforce that a value must first exist in the parent table before it can Continue Reading