Re: ORACLE 10g - Is possible define a instance variable ?

From: Mark D Powell <>
Date: Mon, 2 Nov 2009 07:05:31 -0800 (PST)
Message-ID: <>

On Nov 2, 9:29 am, Santana <> wrote:
> Hi guys,
> Is possible define a new instance variable ? The idea is get the value
> of "UPDATE_FLAG"(I invented this name this dont exists in ORACLE) at
> any time ?
> I know i can do this thorough a tabela, but i only know if exists this
> concept.
> Regards,
> Paulito

This question is not clear, new instance of what? Do you want to know how to create a variable that can be accessed Oracle database instance wide or are you asking about knowing when some value changed?

For Oracle instance wide variables you have package specifications and the Oracle CONTEXT object. Look in the DBA Administration manual and the SQL manual at (CREATE) CONTEXT. You can use a database event logon trigger to to set the context value then retrieve it in application logic.

For table row data changes you have table DML triggers. Update triggers have access to both the :old and :new values for a column.

If neither of these help please post back with more background information on what you are trying to do.

HTH -- Mark D Powell -- Received on Mon Nov 02 2009 - 16:05:31 CET

Original text of this message