title: Workaround for delete in hive with join conditions
body: <p>So i'm trying to convert a SQL delete query to Hive one. Im using hive .12 version's which doesn't supports delete.</p>
  
  <p>Below is the SQL query:</p>
  
  <pre><code>Delete from t1  c where exists(select 1 from t2 a where 
  a.emplid=c.employee_id and a.project_status='test')
  </code></pre>
  
  <p>Now i tried tried using NOT IN for the above query but due to some reasons we cannot use NOT IN in our queries.</p>
  
  <p>below is Hive query i have written but i'm not sure as its not giving correct results. i'm pretty new to hive. can anyone help on this.</p>
  
  <pre><code>INSERT Overwrite table t1
  select * from t1 c left outer join t2 a on (c.employee_id=a.employee_id)
  where a.project_status= 'test'
  and a.employee_id is null
  </code></pre>