Document Table
Doc_ID ,Doc Name, Department
1, Address, 00000000-0000-0000-0000-000000000000
2, Tax ab1b299b-9781-48d9-bedc-f238f6f5cc57
Employee Document table
Doc_ID,Emp_ID
1 , 3
if login employee id is 3 then display 1,2 records(doc_id 1&2)
if login employee is 4 then display only 1 record(doc_id :1)

Khoday AkileshRank #638 · 3.8K reputationPosted Oct 18, 2023, 5:25 PM EDT
If you could have a role type in employee table, then based on that role you can fetch the records.
Naveen KumarRank #249 · 10K reputationPosted Oct 19, 2023, 12:44 AM EDT
You can join the Documnet and EmployeeDocumnet by Doc_ID. Try this.
SELECT ED.Emp_ID, D.Doc_ID, D.Doc_Name, D.Department FROM Document D INNER JOIN EmployeeDocument ED ON D.Doc_ID = ED.Doc_ID --WHERE ED.Emp_ID = 3