Gregory Larsen

Currently a SQL Server DBA. I've been working with SQL Server since 1999. I'm an old-time mainframe DBA. My DBA career started in 1985. Currently studying to obtaining MCDBA.

Stairway to T-SQL DML

Stairway to T-SQL DML Level 5: The Mathematics of SQL: Part 2

Joining tables is a crucial concept to understanding data relationships in a relational database. When you are working with your SQL Server data, you will often need to join tables to produce the results your application requires. Having a good understanding of set theory, and the mathematical operators available and how they are used to join tables will make it easier for you to retrieve the data you need from SQL Server.

5 (1)

You rated this post out of 5. Change rating

2019-05-29 (first published: )

17,872 reads

Stairway to T-SQL DML

Stairway to T-SQL DML Level 4: The Mathematics of SQL: Part 1

A relational database contains tables that relate to each other by key values. When querying data from these related tables you may choose to select data from a single table or many tables. If you select data from many tables, you normally join those tables together using specified join criteria. The concepts of selecting data from tables and joining tables together is all about managing and manipulating sets of data. In Level 4 of this Stairway we will explore the concepts of set theory and mathematical operators to join, merge, and return data from multiple SQL Server tables.

5 (6)

You rated this post out of 5. Change rating

2019-05-22 (first published: )

24,106 reads

Stairway to T-SQL Beyond The Basics

Stairway to T-SQL: Beyond The Basics Level 3: Building a Correlated Subquery

This stairway level will expand on the subquery topic by discussing a type of subquery known as a correlated subquery, and explores what a correlated subquery is and how it is different from a normal subquery.

3.67 (3)

You rated this post out of 5. Change rating

2019-05-08 (first published: )

20,224 reads

Blogs

Unlock the Power of Your Data: From Basic to Advanced Data Analysis

By

Data isn't just about numbers and spreadsheets. It holds stories, patterns, and the answers...

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Webinar – Microsoft Fabric for Dummies

By

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...

Read the latest Blogs

Forums

What is Carisol 350mg ?

By fafawec116

Carisol 350mg is the main ingredient. Its powerful formulation, which includes the active ingredient...

The "ORDER BY" clause behavior

By Alessandro Mortola

Comments posted to this topic are about the item The "ORDER BY" clause behavior

Are IT Certifications Still Relevant?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Are IT Certifications Still Relevant?

Visit the forum

Question of the Day

The "ORDER BY" clause behavior

Let’s consider the following script that can be executed without any error on both SQL Sever and PostgreSQL. We define the table t1 in which we insert three records:

create table t1 (id int primary key, city varchar(50));

insert into t1 values (1, 'Rome'), (2, 'New York'), (3, NULL);
If we execute the following query, how will the records be sorted in both environments?
select city

from t1

order by city;

See possible answers