Oracle中找出用戶的上次登錄時間


可以使用如下sql語句:

select t1.username,t1.logon_time last_logon_time,t2.account_status,created 賬號創建時間 from 
(select username,max(timestamp) logon_time from dba_audit_session where action_name='LOGON' and username in (select username from dba_users) group by username) t1
left join (select username,account_status,created from dba_users) t2 on t2.username=t1.username 

 

 

以上


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM