• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / Oracle/SQL CONCAT/CONCATENATE Function

Oracle/SQL CONCAT/CONCATENATE Function

November 23, 2012 by techhoneyadmin

Oracle CONCATENATE FunctionOracle/SQL CONCAT Function is used to concatenate two strings to form one string. The return type of SQL CONCAT Function is a string. Syntax and examples of Oracle CONCAT Function are mentioned below.


SQL CONCAT Function Syntax

SELECT CONCAT(string_1, string_2)
FROM table_name;

string_1 and string_2 are the strings to be concatenated.


SQL CONCAT Function Example – Use with SQL SELECT Statement

Oracle CONCAT Function is used with the SQL SELECT Statement.

For example, the Oracle CONCAT Function query below returns a string by concatenating two strings.

SELECT CONCAT('TECH', 'HONEY') "Oracle CONCAT Function"
FROM dual;

The above Oracle CONCAT Function query returns ‘TECHHONEY’.

Note: We have aliased CONCAT(‘TECH’, ‘HONEY’) as Oracle CONCAT Function


SQL CONCAT Function – Concatenating Strings having Whitespaces Example

SQL CONCAT Function can also be used to concatenate strings having whitespaces.

For example, the Oracle CONCAT Function query below returns a string after joining two string, one with spaces at the end.

SELECT CONCAT('TECH ', 'HONEY')
FROM dual;

The above Oracle CONCAT Function query returns ‘TECH HONEY’.


SQL CONCAT Function – Concatenating String Having Whitespaces Example

SQL CONCAT Function can also concatenate strings which have white space in between the words.

For example, the below Oracle CONCAT Function query returns a string after joining two string having whitespace at end and in between strings.

SELECT CONCAT('ORACLE ', 'SQL PLSQL')
FROM dual;

The above CONCAT Function query returns ‘ORACLE SQL PLSQL’.


Filed Under: function Tagged With: CONCAT function in oracle plsql, CONCAT function in oracle sql, CONCATPLSQL, how to use CONCAT function in oracle database query, how to use CONCAT function in oracle plsql, how to use CONCAT function in oracle sql, syntax and example of CONCAT function in oracle database query, syntax and example of CONCAT function in oracle plsql, syntax and example of CONCAT function in oracle sql, using CONCAT function in oracle database query, using CONCAT function in oracle plsql, using CONCAT function in oracle sql

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in