Teradat update statement
<p>The current update statement is </p>

<pre><code>UPDATE Table1 t1
SET  column1 = 1 
WHERE not EXISTS
 ( SELECT  1 FROM  Table2 t2 
   WHERE t2.column2= t1.column2
     AND t2.column1 = 0
 )
AND  t1.column2 &gt; 0
AND t1.column1 = 0 
</code></pre>

<p>The above update statement is fine if I have the value of 0 in column1 in the table Table t2. But I have a special scenario that my table Table t2 is having values as 0 and 1 for column1. In this case there should not be no update. In a single statement i have to handle both the situation.</p>

<p>Scenario 1: Update only if Column1 in the Table t2 having the value of 0</p>

<p>Scenario 2: No update if I Column1 in the Table t2 having the value of both 0 and 1</p>

<p>Can you please help me in this.</p>