Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: what this mean ||
Imen Eladham wrote:
>
> hi there,
>
> I am just trying to learn SQL, if u can help.
>
> I have Emp Table with the following 3 colomns
> ename, Salary, Dept No.
>
> Question:
> the statement:
> SQL> Select 'Name: ' || ename "Employee", Salary "Salary"
> From emp
> where deptno = 30
> order by deptno Desc, "Employee"
>
> Why || is used here ???
> why 'Name: ' is used here, it is not a column Name.???
>
> thanks
>
> Imen
The '||' is the concatenation operator, so instead of selecting just the ename column's value, the query is pre-pending 'Name: ' to the value:
Your query results will look something like:
Employee Salary
Name: George 10000.0 Name: Sally 12000.0 Name: William 11000.0
Yours,
Geoff Houck
systems hk
http://members.home.net/houckg
hksys_at_home.com
Received on Sun Jun 24 2001 - 16:57:02 CDT
![]() |
![]() |