Home > database >  Oracle, create a stored procedure, get the latest print every worker a change information.
Oracle, create a stored procedure, get the latest print every worker a change information.

Time:09-21

This is the database

CodePudding user response:

 select * 
The from (select t1. *,
Row_number () over (partition by t1. User_id order by t2. User_change_date desc) rn
The from t1, t2
Where a t1. User_id=t2. User_id) t1
Where a t1. Rn=1;