Home » SQL & PL/SQL » SQL & PL/SQL » Oracle Defined Function (DECODE) (oracle all versions)
Oracle Defined Function (DECODE) [message #643182] Thu, 01 October 2015 02:10 Go to next message
adi_gang
Messages: 1
Registered: October 2015
Location: pune
Junior Member
Dear Experts,

I have seen that the oracle defined function are written in SYS.STANDARD package. but when we use them in sql we dont use the standard.function_name / standard.procedure_name..

example

<Code>
select sys.standard.decode(10,10,-1) from dual;
</Code>
which throws an error...

but when we use

<Code>

select decode(10,10,-1) from dual;
</Code>
it will give the output as -1..

and we try to describe the decode it will throw an error saying object decode not found...

can any one please explain how this is happening in oracle...

regards,
aditya.
Re: Oracle Defined Function (DECODE) [message #643183 is a reply to message #643182] Thu, 01 October 2015 02:28 Go to previous message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

This is how it works.
Nothing is happening.

Internal functions are in STANDARD package and all of them are special, just like SYS is special.
They are like standard objects but are not.

Please read How to use [code] tags and make your code easier to read.

[Updated on: Thu, 01 October 2015 02:29]

Report message to a moderator

Previous Topic: Use of Force View
Next Topic: Replace string based on condition
Goto Forum:
  


Current Time: Sat Jun 27 07:48:54 CDT 2026