建两个视图, 一个IsNew = 0, 一个IsNew = 1

解决方案 »

  1.   

    select id,name,address,isnew=case isnew when 1 then isnew else null end,
        phone=case isnew when 1 then phone else null end,
        ...
       from tt_t
      

  2.   

    select id,name,address,isnew = case isnew when 0 then '' else isnew end,
    ...个人感觉最好是建一个函数,把ISNEW作为参数传进去,返回table,可以直接把函数接在
    from后面用!
      

  3.   

    写前没有刷新页面,倒象我COPY楼上的!
      

  4.   

    to: zheninchangjiang(徐震>愿母亲安息)
    我的意思是当IsNew为0时只显示id, name, address,而其他字段不显示!不是设置为null或者0
      

  5.   

    上面的没错,当应用于程序时null就是不会显示的
      

  6.   

    To: ywh25(不悔)
    哦 我试一下