Who AM I in Oracle

Sometimes, you switched the connection to another schema for more operations and forgot where you are. Here are some ways to know who am I (whoami).

If you're in sqlplus, you check it with the short cut.

SQL> show user
USER is "SCOTT"

If you're not in sqlplus, you can also check the information by querying the environmental function user.

SQL> select user from dual;

USER
------------------------------
SCOTT

Typically and officially, you can query your own dictionary user_users for sure.

SQL> select distinct username from user_users;

USERNAME
---------------
SCOTT

2 thoughts on “Who AM I in Oracle”

Leave a Reply

Your email address will not be published. Required fields are marked *