Oracle / PLSQL: UID function

This article is written about how to use the Oracle/PLSQL UID characteristic with syntax and examples.

Description

The Oracle/PLSQL UID feature returns the identification range for a user’s session (the user who is presently logged in).

Syntax

The syntax for the UID feature in Oracle/PLSQL is:

UID

Parameters or Arguments

There are no parameters or arguments for the UID function.

Returns

The UID function returns a numeric value.

Applies To

The UID feature can be used in the following versions of Oracle/PLSQL:

Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let’s seem to be at some Oracle UID function examples and explore how to use the UID characteristic in Oracle/PLSQL.

For example:

SELECT UID
INTO parm_uid
FROM dual;

The variable referred to as parm_uid will now contain the id range for the user’s session. The fee could be 25, for example.