≡ Menu

Essential SQL

Want to Get Started Using SQL Server?

Databases Have Beautiful Structure

Now it is time to learn SQL in simple English.

  • Receive our free guide Getting Started with SQL Server!
  • Understand fundamental database concepts
  • Take your job to the next level.

Enter your email below to get our free guide to Getting Started with SQL Server.

Null and unknown values

What is a Null Value?

In databases a common issue is what value or placeholder do you use to represent a missing values.   In SQL, this is solved with null.  It is used to signify missing or unknown values.  The keyword NULL is used to indicate these values.  NULL really isn’t a specific value as much as it is an indicator.  Don’t think of NULL as similar to zero or blank, it isn’t the same.  Zero (0) and blanks “ “, are values.

In most of our beginning lessons we’ve assumed all tables contained data; however, SQL treats missing values differently.  It is important to understand how missing values are used and their effect on queries and calculations. [click to continue…]


Get Ready to Learn SQL in an Interview with Dennis Still

Big Data Chronogram

I recently got to know Dennis through twitter and essentaiSQL.com.  If you’re non-technical, you’ll find this interview inspiring.  You too can learn SQL.  If you’re a techie or IT pro, Dennis provides great comments and insights on SQL and data services; ways to better serve your customers.

Before we begin, I want to remind you all that if you have other questions you want answered, then post a comment or tweet me.  I’m here to help you.

With that let’s begin the interview!

[click to continue…]

SQL Server Policy

Recently I had the opportunity to conduct a short interview with Boris Hristov.   I think you find this interview interesting as Boris reveals how he became a DBA and ultimately awarded a MVP designation.

Boris recently created a course to teach DBA’s Policy Based Management; click here to see the course (aff link).  By Using PBM, you can enforce facets such as naming conventions, configuration settings, or data file locations, for example.

PBM is a really valuable and time saving tool.  It’s value comes to light once you realize you’re managing hundreds of databases that developers are getting their hands into!

It provides an automated means to enforce standards across all the DB’s you manage.

Now that you know about one of Boris’ passions, let’s begin the interview.

[click to continue…]


Note:  This is the second in a series of articles covering joins.

The series starts with the article Introduction to Database Joins.  All the examples for this lesson are based on Microsoft SQL Server Management Studio and the AdventureWorks2012 database.  You can get started using these free tools using my Guide Getting Started Using SQL Server. In this article we are going to cover inner joins.

An inner join is used when you need to match rows from two tables.  Rows that match remain in the result, those that don’t are rejected. The match condition is commonly called the join condition.  When the match conditions involve equality, that is matching exactly the contents of one column to another, the join is called an equijoin.  You’ll find that most of the joins you’ll use are equijoins.  A common situation is where you need to join the primary key of one table to the foreign key of another.  This is needed when you are denormalizing data.

[click to continue…]



One of the biggest issues beginning SQL writers have is being able to write queries that use more than one table.  In this series of articles we are going to show you how to write a query that combines, or joins, data from more than one table. Once you have gone through the examples you will understand how to write the basic commands to make this happen and why data is separated in the first place.

This first article introduces the concept of joining tables.  The focus is going to be more on the type of joins, not necessarily their syntax.  The later articles focus on the various types of joins.  Through the narrative and examples you’ll become very comfortable with each one.

In my prior articles you learned about the need to normalize to make it easier to maintain the data.  Though this makes it easier to maintain and update the data, it makes it very inconvenient to view and report information.  Typically the information you need to see has to be cross referenced across several tables for you to see the full picture. [click to continue…]