How to find the schema(user) name from database using a select statement or are there any built in functions available?
I am using the following package for compiling all invalid objects in my schema, so instead of hard coding schema name, I would like to use a select statement or function which returns schema name.
DBMS_UTILITY.compile_schema('SCOTT');
Thanks
I guess, the
USERsystem variable would correspond to what you need, if “my schema” corresponds to “my user”, what it usually does:Or without a PL/SQL block