title: Retrieve non related records in SQL
body: <p>I have two tables in database</p>
  
  <p>1- File table:
     Fields:</p>
  
  <ul>
  <li>File_ID</li>
  <li>File Name</li>
  </ul>
  
  <p>2- User Table:</p>
  
  <ul>
  <li>User_ID</li>
  <li>User Name</li>
  </ul>
  
  <p>Now I have 3rd table which is "File Assigned" which keeps tracks of which file is assigned to which users. </p>
  
  <p>Fields:</p>
  
  <ul>
  <li>File_ID</li>
  <li>User_ID</li>
  <li>Date</li>
  </ul>
  
  <p>I want to retrieve all non related records i.e retrieve all user that are not assigned to a specific file.</p>
  
  <p>Here is my query for related records.</p>
  
  <p>select * from User i 
  join FileRequested r
  on i.UserID= r.UserID
  where r.File_ID = 1175 </p>
  
  <p>Now I want to retrieve all users that are not assigned to that file</p>
  
  <p>Problem: One file can be assigned to multiple users.
  I have tried following query but that didn't work</p>
  
  <p>select * from User i 
  join FileRequested r
  on i.UserID= r.UserID
  where r.File_ID != 1175 or r.File_ID is null </p>