title: modifying a view containing two tables sql server 2012
body: <p>learning the concept of views.
  1)i created two tables and a view.
  2) modified the e_id of a person in the view.</p>
  
  <p>Expected result: want the id to be changed in the view as well as the tables.</p>
  
  <p>Actual Result: the modified row got deleted from the view.
  but the e_id was changed in one of the tabes</p>
  
  <p>i created a simple table called emp_info( e_id,ename)
  Tim 128
  melissa 132</p>
  
  <p>Table 2: mytab containing(desig,salary,doj,ssn,e_id)
  Executive sales head    81000.9 1/10/2011   1003    128
  Executive head kindle   99077.9 11/10/2011  1004    132</p>
  
  <p>created a view vmytab</p>
  
  <pre><code>create view vmytab
  as
  select b.e_id,a.ename,b.desig from
  mytab b,emp_info a
  where a.e_id=b.e_id
  </code></pre>
  
  <p>I tried to change the employee id(E-ID) of melissa.</p>
  
  <pre><code>update vmytab set e_id=200 where ename='melissa'
  </code></pre>
  
  <p>i got the result (1 row(s) affected)</p>
  
  <p>when i checked my view(<code>select * from vmytab</code>)
  the whole row belonging to melissa was missing
  only 1 record belonging to tim was there.</p>
  
  <p>but when i checked mytab table,the e_id of melissa had been changed to 200.</p>
  
  <p>i again checked emp_info. here the old record i.e melissa  132  was present.</p>
  
  <p>can anyone explain the indiscrepensies or have i done anything wrong in the code?</p>