CONCAT Function - SQL Server to PostgreSQL Migration

In SQL Server and PostgreSQL, the CONCAT function concatenates one or more strings.

SQL Server:

  -- Concatenate strings
  SELECT CONCAT('Hello,', ' world', '!');
  # Hello, world!
 
  -- NULL value is considered as an empty string
  SELECT CONCAT('Hello,', NULL, ' world', '!');
  # Hello, world!

PostgreSQL:

  -- Concatenate strings
  SELECT CONCAT('Hello,', ' world', '!');
  # Hello, world!
 
  -- NULL value is considered as an empty string
  SELECT CONCAT('Hello,', NULL, ' world', '!');
  # Hello, world!

For more information, see SQL Server to PostgreSQL Migration.