Place you banner Advertisement here for free to sponsor this page.

 

Concatenation in SQL: 

Home

Topics
Basic Select statements
Select Columns
Arithmetic Expressions
NULL Manipulation
Column Aliases
Concatenation
Duplicates

Concatenation in SQL: 

We can concatenate strings or we can concatenate columns in sql using concatenation operator provided by ORACLE, the operator is || ( two vertical bars) . We will try one query so that you can get familiar with this.

  • Select last_name||first_name as fullname from employees

Above query will concatenate the two columns and give you the result as string. we used "as fullname" in this query to make fullname as alias for the concatenated string.

  • select 'concatenate' || ' _ ' || ' Strings' as concatHeaderString from dual

Above query is concatenate strings and give you the result as 'concatenate _ Strings'.

  • A concatenation operator creates result as character expression
  • A concatenation operator is represented by two vertical bars ( || )
 
www.iforerunner.com