我想要把一个P表中所有红色的零件改为浅红色,用以下语句不行。请问错在哪?(其中表中有两个零件是红色的,pno是零件号)
update P
SET color='浅红'
where pno=(select pno,color
from p
where clolor='红')

解决方案 »

  1.   

    update p set
        color = '浅红'
    where color = '红'
      

  2.   

    update P 
    SET color='浅红' 
    where pno IN (select pno
    from p 
    where clolor='红')update P 
    SET color='浅红' where clolor='红'
      

  3.   

    update 
      p 
    set
      color = '浅红'
    where 
      color = '红'
      

  4.   

    --呵呵:我也来瞎整一句:
    update 
      p 
    set
      color = '浅'+color
    where 
      color = '红'
      

  5.   

    update P 
    SET color='浅红' 
    where clolor='红'
      

  6.   

    两个字段不一样?update P 
    SET color='浅红' 
    where color='红'update P 
    SET color='浅红' 
    where clolor='红'
      

  7.   

    只用第一个SQL code 是不行的我试过了!