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 to load data with out header and footer records in a database using sql*loader? pls tell me the answer urgently

1 Answers   Oracle, Wipro,


Can a table have no primary key?

0 Answers  


How to sort the rows in sql.

0 Answers  


What is sql data?

0 Answers  


Is full outer join same as cross join?

0 Answers  






Why are aggregate functions called so?

0 Answers  


Why we use stored procedure instead of query?

0 Answers  


Why we use join in sql?

0 Answers  


hello..... i am an comp science engineering graduate planning to do ORACLE certification in PLSQL 9i. just wanted to know whats the possibility getting job is their openings???? is it worth doin that course n certification

1 Answers  


What is partition by in sql?

0 Answers  


What are different clauses used in sql?

0 Answers  


What are few of the schema objects that are created using PL/SQL?

0 Answers  


Categories