Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Rais.

Asked: June 01, 2018 - 7:25 am UTC

Last updated: June 01, 2018 - 8:27 am UTC

Version: 11g

Viewed 1000+ times

You Asked

I have a table 
create table user_password_history
(user_cd varchar2(3),
user_pass varchar2(30),
created_date date);

i want to keep last 5 records of each user in this table. kindly guide me how to achieve it.

Thanks for your support.

and Connor said...

Simplest answer to that is .... Don't!

We have that functionality already in the database. Check out PASSWORD_REUSE_TIME and PASSWORD_REUSE_MAX at

https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_6010.htm#SQLRF01310



Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.