Writing SQL

Combining Columns and Tables

Concatenating columns, the MERGE command and joining tables that share column names.

How to combine 2 column into 1 column?

Combine two columns into one by concatenating their text or stacking their rows. Examples for SQL Server, plus how to handle NULLs and numbers.

2 min read

How to use merge command in SQL?

The MERGE statement inserts, updates and deletes rows by matching a source table to a target. Syntax, a worked example and common errors to avoid.

2 min read

What is the use of || in SQL?

The || operator joins strings in standard SQL. Here is which databases support it, how it handles NULL values, and how it works in SQL Server.

2 min read

Related topics

More in writing sql