4 Replies Latest reply: Dec 28, 2012 12:14 AM by 981979 RSS

    updatiog two column of one table ?

    981979
      Hi Guys

      i am Learning Oracle sql

      when am going to update 'place' of two members it does not updating, here is the querry

      employee Table
      EMPNO   EMPNAME       JOB            SALARY   PLACE
      ----------- ----------------     ------            ------------  -------------
      1           san              employee       25000     africa
      
      2           tan              employee       30000     Africa
      
      3           pan              employee       35000     Africa
      
      4           sony            employee        40000     africa
      i want to update place of employee san and sony
      i tried ths

      NOT WORKING
      sql> update employee
             set place = 'Africa'
             where empno = 1 and empno = 4;
      0 rows updated
      WORKING
      sql> update employee
             set place = 'Africa'
             where empname like 's%';
      2 rows updated
      why 1st one is not working ?

      thanks

      Edited by: 978976 on Dec 27, 2012 9:43 PM

      Edited by: 978976 on Dec 27, 2012 9:52 PM

      Edited by: 978976 on Dec 27, 2012 9:55 PM

      Edited by: 978976 on Dec 27, 2012 9:57 PM

      Edited by: 978976 on Dec 27, 2012 9:57 PM