Subscribe:
Showing posts with label Concatenation. Show all posts
Showing posts with label Concatenation. Show all posts

Monday, September 26, 2011

LINKING COLUMNS AND LITTERAL STRINGS


LINKING COLUMNS AND LITTERAL STRINGS

Through Linking Columns And Literal Strings With Concatenation Operator In A Select Clause, You Can Produce Customized Results That Are Easy To Read And Understand. 
PLEASE CHECK THE BELOW EXAMPLE.


Tuesday, August 23, 2011

Concatenation Operator


SQL CONCATENATION

You can use concatenation to link columns to  another columns ,when you concatenate -oracle concat-tow columns . output displays as a single column .
For Example
SELECT EMPNO||' '||ENAME
FROM EMP;


EMPNO||''||ENAME
------------------
7369 SMITH
7499 ALLEN
7521 WARD
7566 JONES
7654 MARTIN
7698 BLAKE
7782 CLARK
7788 SCOTT
7839 KING
7844 TURNER
7876 ADAMS

Also You can use allies

Select empno||' '||ename as employee
From emp;


EMPLOYEE
---------------
7369 SMITH
7499 ALLEN
7521 WARD
7566 JONES
7654 MARTIN
7698 BLAKE
7782 CLARK
7788 SCOTT
7839 KING
7844 TURNER
7876 ADAMS