write a query find which rows of a table is updated on 2
days before?

Answers were Sorted based on User's Feedback



write a query find which rows of a table is updated on 2 days before?..

Answer / ajit nayak

SELECT * FROM USER_TAB_MODIFICATIONS
WHERE TO_DATE(TIMESTAMP,'DD-MON-YYYY') = TO_DATE(SYSDATE - 2,'DD-MON-YYYY');

Is This Answer Correct ?    0 Yes 0 No

write a query find which rows of a table is updated on 2 days before?..

Answer / bikash khuntia

We can check that whether the table updated on 2 days
before or not as below:-

SELECT * FROM USER_TAB_MODIFICATIONS TB
WHERE TB.table_name='TABLE_NAME'
AND TO_CHAR(TIMESTAMP,'DD')<=2

Is This Answer Correct ?    2 Yes 3 No

write a query find which rows of a table is updated on 2 days before?..

Answer / os reddy

select * from <table name>
where rownum<=2
order by last_updated_date;

OR

select * from emp where to_char(update_column,'dd')=2;

Is This Answer Correct ?    3 Yes 10 No

Post New Answer

More SQL PLSQL Interview Questions

How global cursor can be declare with dynamic trigger ?

0 Answers  


how to drop an existing view in mysql? : Sql dba

0 Answers  


Explain the working of foreign key?

0 Answers  


I want to know the difference between A Record Type and a Table.

3 Answers   Thermotech,


what is inline command?

2 Answers  






How to count the no of records of a table without using COUNT function?

11 Answers   TCS, Tesco,


What is the purpose of the partition table?

0 Answers  


How do I run a query in pl sql developer?

0 Answers  


What is a ddl command?

0 Answers  


Can a trigger call a stored procedure?

0 Answers  


How exception is different from error?

0 Answers  


Why select is used in sql?

0 Answers  


Categories