Oracle Miscellaneous Functions Version 20c |
---|
General Information | ||
Library Note |
|
|
This page is a collection of functions not covered on other pages in the Library. For a close to complete list of Oracle built-in functions and demos in the library, both stand-alone and in built-in packages: [ Click Here ]. |
||
DATAOBJ_TO_MAT_PARTITION | ||
According to the docs is "useful only to Data Cartridge Developers performing data maintenance activities on the base table of a domain index: Well maybe. According to the data dictionary this was introduced version 6.0 but I did not discover it until 12.1.0.2. |
dataobj_to_mat_partition(<table_name, <partition_id>) RETURN NUMBER; Values must be passed to this procedure by the appropriate ODCIIndex method and the NUMBER returned is the partition ID of the corresponding system partitioned table. |
|
conn uwclass/uwclass@pdbdev |
||
DATAOBJ_TO_PARTITION | ||
According to the docs is "useful only to Data Cartridge Developers performing data maintenance activities on the base table of a domain index: Well maybe. Introduced version 6.0 |
dataobj_to_partition(<table_name, <partition_id>) RETURN NUMBER; |
|
conn uwclass/uwclass@pdbdev |
||
LNNVL | ||
Evaluates a condition when one or both operands of the condition may be NULL | LNNVL(<condition>) RETURN BOOLEAN; |
|
conn hr/hr@pdbdev |
||
MATCH_NUMBER | ||
Returns the sequential number of a row pattern match within the row pattern partition. Refer to the CLASSIFIER function above. | MATCH_NUMBER() |
|
TBD | ||
NULLIF | ||
Compares expr1 and expr2. If they are equal, then the function returns null. If they are not equal, then the function returns expr1. You cannot specify the literal NULL for expr1. Overload 1 |
NULLIF(v1 IN VARCHAR2, v2 IN VARCHAR2) RETURN VARCHAR2; |
|
conn hr/hr@pdbdev |
||
Overload 2 | NULLIF(v1 IN BOOLEAN, b2 IN BOOLEAN) RETURN VARCHAR2; |
|
TBD | ||
Overload 3 | NULLIF(a1 IN "<OPAQUE_1>", a2 IN "<OPAQUE_1>") RETURN VARCHAR2; |
|
TBD | ||
Overload 4 | NULLIF(a1 IN "<ADT_1>", a2 IN "<ADT_1>") RETURN VARCHAR2; |
|
TBD | ||
NVL | ||
Returns a value if the BOOLEAN expression IS NULL Overload 1 |
NVL(b1 IN BOOLEAN, b2 IN BOOLEAN) RETURN BOOLEAN; |
|
set serveroutput on |
||
Returns a value if the VARCHAR2 expression IS NULL Overload 2 |
NVL( |
|
set serveroutput on |
||
Returns a value if the NUMERIC expression IS NULL Overload 3 |
NVL(n1 IN NUMBER, n2 IN NUMBER) RETURN NUMBER; |
|
set serveroutput on |
||
Returns a value if the DATE expression IS NULL Overload 4 |
NVL(d1 IN DATE, d2 IN DATE) RETURN DATE; |
|
set serveroutput on |
||
MSLABEL Overload 5 |
NVL(label1 MSLABEL, label2 IN MSLABEL) RETURN MSLABEL; |
|
TBD | ||
ADT Overload 6 |
NVL(b1 IN "<ADT_1>", IN b2 IN "<ADT_1>") RETURN "<ADT_1>"; |
|
TBD | ||
REF ADT Overload 7 |
NVL(b1 IN REF "<ADT_1>", b2 IN REF "<ADT_1>") RETURN REF "<ADT_1>"; |
|
TBD | ||
Collection Overload 8 |
NVL(b1 IN "<COLLECTION_1>", b2 IN "<COLLECTION_1>") |
|
TBD | ||
Returns a value if the REF CURSOR expression IS NULL Overload 9 |
NVL(b1 IN "<REF_CURSOR_1>", b2 IN "<REF_CURSOR_1>") |
|
TBD | ||
TIME Overload 10 |
NVL(b1 IN TIME_UNCONSTRAINED, b2 IN TIME_UNCONSTRAINED) |
|
TBD | ||
TIME_TZ Overload 11 |
NVL(b1 IN TIME_TZ_UNCONSTRAINED, b2 IN TIME_TZ_UNCONSTRAINED) |
|
TBD | ||
TIMESTAMP Overload 12 |
NVL(b1 IN TIMESTAMP_UNCONSTRAINED, b2 IN TIMESTAMP_UNCONSTRAINED) |
|
TBD | ||
TIMESTAMP_TZ Overload 13 |
NVL(b1 IN TIMESTAMP_TZ_UNCONSTRAINED, b2 IN TIMESTAMP_TZ_UNCONSTRAINED) |
|
TBD | ||
TIMESTAMP_LTZ Overload 14 |
NVL(b1 IN TIMESTAMP_LTZ_UNCONSTRAINED, b2 IN TIMESTAMP_LTZ_UNCONSTRAINED) |
|
TBD | ||
YMINTERVAL Overload 15 |
NVL(b1 IN YMINTERVAL_UNCONSTRAINED, b2 IN YMINTERVAL_UNCONSTRAINED) |
|
TBD | ||
DSINTERVAL Overload 16 |
NVL(b1 IN DSINTERVAL_UNCONSTRAINED, b2 IN DSINTERVAL_UNCONSTRAINED) |
|
TBD | ||
Returns a value if the CLOB expression IS NULL Overload 17 |
NVL(s1 IN CLOB CHARACTER SET ANY_CS, s2 IN CHARACTER SET s1%CHARSET) |
|
TBD | ||
Returns a value if the BINARY FLOAT expression IS NULL Overload 18 |
NVL(f1 IN BINARY_FLOAT, f2 IN BINARY_FLOAT) RETURN BINARY_FLOAT; |
|
TBD | ||
Returns a value if the BINARY DOUBLE expression IS NULL Overload 19 |
NVL(d1 IN BINARY_DOUBLE, d2 IN BINARY_DOUBLE) RETURN BINARY_DOUBLE; |
|
TBD | ||
Returns a value if the PLS_INTEGER or BINARY_INTEGER expression IS NULL Overload 20 |
NVL(i1 IN PLS_INTEGER, i2 IN PLS_INTEGER) RETURN PLS_INTEGER; |
|
TBD | ||
NVL2 | ||
Returns First Value if NOT NULL, Second Value if NULL Thanks Cary Hogan and Kaifer Bohus for the corrections |
NVL2(<expression>, <return_if_not_null>, <return_if_null>) |
|
conn uwclass/uwclass@pdbdev |
||
ORA_INVOKING_USER | ||
Returns the name of the database user who invoked the current statement or view | ORA_INVOKING_USER RETURN VARCHAR2; |
|
SELECT ora_invoking_user |
||
ORA_INVOKING_USERID | ||
Returns the user id of the database user who invoked the current statement or view | ORA_INVOKING_USER RETURN NUMBER; |
|
SELECT ora_invoking_userid |
||
SQLCODE | ||
Number of the most recent exception raised by PL/SQL. 0 if none | standard.sqlcode RETURN PLS_INTEGER; |
|
set serveroutput on -- see Exceptions page |
||
SQLERRM | ||
Error message associated with the specified code Overload 1 |
standard.sqlerrm RETURN VARCHAR2; |
|
set serveroutput on -- see Exceptions page |
||
Overload 2 | standard.sqlerrm(code_in IN INTEGER := SQLCODE) RETURN VARCHAR2; |
|
set serveroutput on -- see Exceptions page |
||
STANDARD_HASH | ||
Returns a hash value using one of several hash algorithms defined and standardized by the National Institute of Standards and Technology (NIST). This function is useful for performing authentication and maintaining data integrity in security applications such as digital signatures, checksums, and fingerprinting. | standard_hash(<arg> IN VARCHAR2) RETURN RAW; |
|
conn / as sysdba |
||
SQL_GUID | ||
Returns a globally unique identifier made up of 16 bytes. On most platforms, the generated identifier consists of a host identifier, a process or thread identifier of the process or thread invoking the function, and a nonrepeating value (sequence of bytes) for that process or thread. | SYS_GUID RETURN RAW; |
|
conn uwclass/uwclass@pdbdev |
||
SYS_TYPEID | ||
Returns the typeid of the most specific type of the operand | SYS_TYPEID(<object_type_value>) RETURN ?; |
|
CREATE TYPE person_t AS OBJECT (name VARCHAR2(30), ssn NUMBER) |
||
SYS_OP_ZONE_ID | ||
Returns the zone ID corresponding to a talble rowid and returns a zone ID. The zone ID identifies the set of contiguous disk blocks, called the zone, that contains the row. The SYS_OP_ZONE_ID function is used when creating a zone map with the CREATE MATERIALIZED ZONEMAP statement. You must specify SYS_OP_ZONE_ID in the SELECT and GROUP BY clauses of the defining subquery of the zone map. Not stated is a lot of additional issues as you will see in the demo on the right side of this page including the fact that you must have EE, must purchase the PARTITIONING OPTION, and must be running on an Exadata or SuperClsuter. Too bad. |
SYS_OP_ZONE_ID('[schema.table.rowid] <rowid>', [<scale>]) |
|
SQL> conn uwclass/uwclass@pdbdev |
||
UID | ||
User Session ID | UID RETURN PLS_INTEGER; |
|
SELECT uid |
||
USER | ||
Username As Connected | USER RETURN VARCHAR2; |
|
SELECT user FROM dual; |
||
USERENV (deprecated: use SYS_CONTEXT) | ||
Syntax | SELECT userenv(envstr IN VARCHAR2) RETURN VARCHAR2; |
|
Session info. stored with DBMS_APPLICATION_INFO | SELECT userenv('CLIENT_INFO') FROM dual; |
|
The current audit entry number. The audit entryid sequence is shared between fine-grained audit records and regular audit records. You cannot use this attribute in distributed SQL statements | SELECT userenv('ENTRYID') |
|
Current instance identifier | SELECT userenv('INSTANCE') |
|
Returns 'TRUE' if the user has been authenticated as having DBA privileges either through the operating system or through a password file | SELECT userenv('ISDBA') |
|
The ISO abbreviation for the language name, a shorter form than the existing 'LANGUAGE' parameter | SELECT userenv('LANG') |
|
The language and territory currently used by the session, along with the database character set, in the form: language_territory dot characterset. | SELECT userenv('LANGUAGE') |
|
The auditing session identifier (not available in distributed SQL statements) | SELECT userenv('SESSIONID') |
|
Returns the operating system identifier for the terminal of the current session. In distributed SQL statements, this parameter returns the identifier for your local session. In a distributed environment, this parameter is supported only for remote SELECT statements, not for remote INSERT, UPDATE, or DELETE operations. | SELECT userenv('TERMINAL') |
|
VALUE | ||
Takes as its argument a correlation variable (table alias) associated with a row of an object table and returns object instances stored in the object table. The type of the object instances is the same type as the object table. | VALUE(item IN "<ADT_WITH_OID>") RETURN "<ADT_1>"; |
|
CREATE TYPE address_t AS OBJECT ( |
||
XOR | ||
Exclusive OR Operator | standard.XOR(left IN BOOLEAN, right IN BOOLEAN) RETURN BOOLEAN; |
|
set serveroutput on |
This site is maintained by Dan Morgan. Last Updated: | This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2023 Daniel A. Morgan All Rights Reserved | |||||||||
|
||||||||||