Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: what this mean ||

Re: what this mean ||

From: Hans Forbrich <forbrich_at_telusplanet.net>
Date: Mon, 25 Jun 2001 02:11:53 GMT
Message-ID: <3B36A073.863AFF77@telusplanet.net>

You might benefit from looking at Technet documentation - the entire SQL Reference manual is available there and it explains such constructs and a lot more.

The path to the documentation is: http://technet.oracle.com > Documentation > Oracle8i and Oracle8i JVM > General Documentation, Release 3 (8.1.7) (html link) > Oracle8i Server and
SQL*Plus (html link) > Oracle8i SQL Reference

(The > means click on the link associated with the next item)

Note, you want to start with th SQL Reference, not SQL*Plus - SQL*Plus is more of a 'shell' in which to run SQL commands (as identified in the SQL Reference) and additional SQL*Plus commands, many used strictly for I/O formatting.

/Hans

Sydney Palmer wrote:

> 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 - 21:11:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US