uid | empno | work_type |
aa0001 | 18050 | uid_creat |
aa0001 | 18056 | prep |
aa0001 | 18351 | valid |
aa0002 | 18056 | uid_creat |
aa0002 | 18050 | prep |
aa0002 | 18351 | valid |
- uid_creat
- prep
- valid
uid is fk from uid table,
empno is fk from emp table
work_typ is fk form wor_def table
priamry key(uid,empno,work_type)
in the above table for each uid there should be a unique empno but there we should perform a check condition that at first uid_creat work_type need to assign for a UID ,
if we try to assing prep before uid_creat it shud throw error i.e 'wrong work assign'
regards
Narender