Write an SQL query to fetch only new and changed rows?
Note :This is the question asked by a visitor Sravan. I am posting this in proper forum.
Printable View
Write an SQL query to fetch only new and changed rows?
Note :This is the question asked by a visitor Sravan. I am posting this in proper forum.
I know the reply is bit late, but even then it might help others who have the same doubt :-)
Rather than using a query, u can go for database triggers.
Using the OLD & NEW qualifiers of Row Triggers, the record before & after the modification can be fetched.
Here is an sample,
insert into aud_emp(employee_id, old_salary, new_salary)
values (emp_id, :OLD.salary, :NEW.salary);
*** Mangai Varma ***
if u want fetch only new or changed row.it can be possible with search condition,
like
SQL>select * from emp where ename='johns';