SQL Language (MOSC)

MOSC Banner

sys_context does not show records when used as part of sql

edited Feb 20, 2024 9:41PM in SQL Language (MOSC) 5 commentsAnswered ✓

Oracle DB 19.15

Using sys_context as part of the SQL statement (owner = sys_context('USERENV','CURRENT_SCHEMA')) returns as results zero records.

As a workaround, replacing this for the specific value or using a variable previously initialized with the sys_context works as expected.

Any idea why this behavior?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center