Tuesday, 13 January 2015

Joining Table Columns in SQL

In your SELECT statement you can join two or more columns, arithmetic expressions, or constant values into a single column using the concatenation operator which is represented by two vertical bars (II). The resultant column is generated as a character expression. In the following example, we combined first and last names of employees and presented the values under a new title: Employees.


    SQL Statement :

SELECT       first_name||last_name AS “Employees”
FROM          employees;

    Output :


























No comments:

Post a Comment