Sunday, 16 June 2019

SQL Tutorial : DRL / DQL -CONCATENATION & LITERALS


SQL Tutorial : DRL / DQL -CONCATENATION & LITERALS
Let's learn about next topic: CONCATENATION & LITERALS

CONCATENATION:
*****************
- will use pipeline to concatenate as below

SELECT EMPLOYEE_ID,FIRST_NAME||LAST_NAME EMP_NAME
FROM EMPLOYEES



LITERALS:
*********
- DATE AND CHARACTERS ARE ENCLOSED
- WITHIN SINGLE QUOTES

eg:

SELECT 'Employee '||LAST_NAME ||'gets a Salary of '||
SALARY "EMP DETAILS"
FROM EMPLOYEES

No comments:

Post a Comment