select name, isnull(pic,'C:\'+name+'.JPG') from tablename

解决方案 »

  1.   

    select name, isnull(pic,'C:\'+name+'.JPG') from tablename
    這個看起來不是我想要的
    我的目的是將數據表的數據改變,不是顯示出來!
      

  2.   

    Update tablename Set PIC=isnull(pic,'C:\'+name+'.JPG')
      

  3.   

    Set PIC=isnull(pic,'C:\'+name+'.JPG')能解釋這語句的含義?isnull返回的是什麽?
      

  4.   

    如果pic字段为空(null),则pic值等于'c:\'+name+'.jpg'值.Update tablename Set PIC=isnull(pic,'C:\'+name+'.JPG')是正确的。
      

  5.   

    update 你的表 set name='c:\'+name+'.jpg'
        where pic is null
      

  6.   

    update tablename set pic=isnull(pic,'C:\'+name+'.JPG')