Concatenation

What Does Concatenation Mean?

Concatenation, in the context of databases, refers to the joining together two or more things into a large one. In database parlance, the things being joined are generally two table fields which may be from the same or different tables.

Advertisements

Techopedia Explains Concatenation

The most common use of concatenation is to join two database fields that are stored separately but usually operated upon together. Take for example to fields named ‘FIRST NAME’ and ‘SURNAME’. These two fields are sometimes as two stored separate fields, but when retrieving them the viewer will usually want to see both names.

Concatenation is achieved by use of a special concatenation operator in a SQL query. For example, Oracle Database uses the || operator to join two strings. A sample SQL query to achieve this is:

SELECT first_name||’ ‘||surname FROM customer_master.

Note that in this case we have also included a space (enclosed by ‘ ‘) between the two names. This is simply to enhance the legibility of the final output. If we just joined the two fields without a space in between the query would be:

SELECT first_name||surname FROM customer_master.

Advertisements

Related Terms

Latest Buzzwords and Jargon Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…