Re: new sql question

From: rob <rob_at_dsdelft.nl>
Date: Wed, 7 Mar 2001 13:10:00 +0100
Message-ID: <9858ij$d0e$1_at_news.tudelft.nl>


>
> Why did I get three number (800) by following sql
> SQL> select 200*4 from bonus;
>
select count(*) from bonus;
I bet the answer is 3.
So it's because you got three records in the table bonus.

Often table dual is used for this (dual only has 1 record) select 200*4 from dual;

or if you insist on using table bonus:
select 200*4 from bonus
where rownum = 1;

Rob Received on Wed Mar 07 2001 - 13:10:00 CET

Original text of this message