lejo

lejo

  • 1.3k
  • 429
  • 14.9k

sql query to find all records or particular employee permitted record

Oct 18 2023 3:05 PM

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)


Answers (2)