Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Statement
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
![]() |
![]() |