2 Replies Latest reply: Oct 6, 2012 3:00 PM by rp0428 RSS

    Need query to find the Time  when a row has been updated recently in table.

    966590
      Hi All,

      I have a access to table say Table A,Table B and Table C . I have no access to modify or to add any column in Table A or Table B or Table C. I have only access to read table entries of Table A ,Table B and Table C. Entries of these tables are updated by owner of the table. I have created a view of Table A, Table B and Table C with required column by my module.

      Now there is requirement that my module should also log Timestamp when any particular row of Table A has been last updated .There is no column in any table A ,B or C that has time stamp entries .

      Please help me out to resolve this problem.
        • 1. Re: Need query to find the Time  when a row has been updated recently in table.
          sb92075
          963587 wrote:
          Hi All,

          I have a access to table say Table A,Table B and Table C . I have no access to modify or to add any column in Table A or Table B or Table C. I have only access to read table entries of Table A ,Table B and Table C. Entries of these tables are updated by owner of the table. I have created a view of Table A, Table B and Table C with required column by my module.

          Now there is requirement that my module should also log Timestamp when any particular row of Table A has been last updated .There is no column in any table A ,B or C that has time stamp entries .

          Please help me out to resolve this problem.
          The optimal solution would be a TRIGGER on each table.


          How do I ask a question on the forums?
          SQL and PL/SQL FAQ
          • 2. Re: Need query to find the Time  when a row has been updated recently in table.
            rp0428
            >
            Now there is requirement that my module should also log Timestamp when any particular row of Table A has been last updated .There is no column in any table A ,B or C that has time stamp entries .

            Please help me out to resolve this problem.
            >
            The simplest way is to create a MATERIALIZED VIEW LOG on each table and let Oracle do the work for you.

            Oracle will create log records that record the changes made to the base table.

            See 'Logging Columns in the Materialized View Log in the Advanced Replication doc
            http://docs.oracle.com/cd/B28359_01/server.111/b28326/repplan.htm#i16640