How to Concatenate Strings in SQL

Most of the major RDBMSs provide several options for concatenating two or more strings.

  • There’s the CONCAT() function, which concatenates its arguments.
  • There’s also a CONCAT_WS() that allows you to specify a separator that separates the concatenated strings.
  • And there’s also a string concatenation operator, which allows us to concatenate its operands.

Below are examples of each method.

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