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

1> how are u debugging in plsql ? 2> how to connect oracle database from unix. is there ne way other than using sqlplus ?

2 Answers  


What is trigger and how to use it in sql?

0 Answers  


Can i use Commit inside the Trigger? Suppose i use commit what will be happy (it's complied /executed/work)

6 Answers  


Is pl sql better than sql?

0 Answers  


When is the explicit cursor used ?

0 Answers  






what is meant by nl2br()? : Sql dba

0 Answers  


what is the use of HASH, LIST partitions?

1 Answers   ITC Infotech,


Can you join views in sql?

0 Answers  


how to start mysql server? : Sql dba

0 Answers  


There are 5 records in a table and we have implemented two triggers that are :pre_query and post_query how many times these triggers will fire.

2 Answers   Maruti Suzuki,


Does it possible to pass object (or) table as an argument to a remote procedure?

1 Answers   TCS,


Can a view be mutating? If yes, then how?

0 Answers  


Categories