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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Statement

Re: SQL Statement

From: Hemei <Hemei_at_yahoo.com>
Date: Thu, 22 Jul 1999 21:29:07 -0400
Message-ID: <7n8lbg$o11$3@news.udel.edu>


Could you tell me, which one has the better performance 'decode()' or 'if-else-endif'? Thanks.

Ken Geis wrote in message <3794F8A9.14BC6514_at_cchemnt.cchem.berkeley.edu>...
>The "decode" can be read as
>
>if rownum % 5 = 0 then
> rownum
>else
> null
>
>
>Ken
>
>"Tay, Virginia" wrote:
>>
>> Hi,
>>
>> Can someone explain the following SQL statement for
me...Especially.....the
>> DECODE functon....Why do I need to put a 'O' right after MOD...???
>>
>> select title, doc_category, decode(mod(rownum,5),0,rownum,null)
>> from fieldd0200
>>
>> Thanks in advance!!!
>>
>> Ben
Received on Thu Jul 22 1999 - 20:29:07 CDT

Original text of this message

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