Concatenation operator are used to link column or string with another column or strings.
SQL> select 'Employee Name '||first_name||' '||last_name "Name of Employee" , salary from employees;
Name of Employee SALARY
------------------------------------------------------------ ----------
Employee Name Steven King 24000
Employee Name Neena Kochhar C 17000
Employee Name Lex De Haan 17000
Employee Name Alexander Hunold 9000
Employee Name Bruce Ernst 6000
Employee Name David Austin 4800
Employee Name Valli Pataballa 4800
Employee Name Diana Lorentz 4200
Employee Name Nancy Greenberg 12008
Employee Name Daniel Faviet 9000
Employee Name John Chen 8200
11rows selected.
SQL>
SQL> select 'Employee Name '||first_name||' '||last_name "Name of Employee" , salary from employees;
Name of Employee SALARY
------------------------------------------------------------ ----------
Employee Name Steven King 24000
Employee Name Neena Kochhar C 17000
Employee Name Lex De Haan 17000
Employee Name Alexander Hunold 9000
Employee Name Bruce Ernst 6000
Employee Name David Austin 4800
Employee Name Valli Pataballa 4800
Employee Name Diana Lorentz 4200
Employee Name Nancy Greenberg 12008
Employee Name Daniel Faviet 9000
Employee Name John Chen 8200
11rows selected.
SQL>
No comments:
Post a Comment