Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Retrive records generated in the last 5 minutes

Y.RamletOct 25 2013 — edited Oct 25 2013

DB version :11.2.0.3

We have a date column called login_time as shown below.

SQL> select username, login_time from audit_user ;

USERNAME                       LOGIN_TIME

------------------------------ ----------------

LDAPUSER                       25-10-2013 11:38

LDAPUSER                       25-10-2013 11:39

LDAPUSER                       25-10-2013 11:42

LDAPUSER                       25-10-2013 11:42

How can I retrieve records generated in the last 5 minutes ? ie How can I put the below SQL in the correct syntax ?

select username, login_time from audit_user where login_time > sysdate - 5 Minutes;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2013
Added on Oct 25 2013
3 comments
1,339 views