SQL Server CASE Expression

In SQL Server, the T-SQL CASE expression is a scalar expression that returns a value based on conditional logic. It evaluates a list of conditions and returns a value, based on the outcome of those conditions..

In some ways, the SQL Server CASE expression is similar to IF...ELSE. However, CASE allows you to check for multiple conditions, whereas IF...ELSE doesn’t.

Continue reading

Install PostgreSQL on Ubuntu 20.04

Did you know that PostgreSQL is available in all Ubuntu versions by default?

Yes, that means that your Ubuntu 20.04 installation probably already has a PostgreSQL package sitting there waiting for you to install it.

And you can install it with one command, which I’ll show you below.

But what if you prefer to run the latest version of Postgres instead? Well, I’ll also show you how to install that. Installing the latest version is almost as easy as installing your local package.

Continue reading

Install PostgreSQL on Ubuntu 18.04

The following steps demonstrate how to install PostgresSQL on Ubuntu 18.04.

There are a couple of ways to go about installing Postgres on Ubuntu.

But before we start jumping in and installing it, did you know that by default, PostgreSQL is already available in Ubuntu 18.04?

So one option is to go right ahead and use the version that’s already included with Ubuntu.

But unless you have reason not to, you will probably want to run the latest version of PostgreSQL, in which case you’ll want to download and install the latest version.

This tutorial covers both options.

Continue reading

Change the Priority of an Account within a Database Mail Profile (SSMS)

Here, I demonstrate how to change the priority of a Database Mail account within a profile in SQL Server using the SQL Server Management Studio (SSMS) graphical user interface.

If you want to see how to do it using T-SQL, see Change the Sequence Number of an Account in Database Mail (T-SQL).

The priority and the sequence number are the same thing (when you change it with T-SQL you use the @sequence_number parameter).

Continue reading