select top 6 from 表 where image is not null

解决方案 »

  1.   

    select * from 表 where 日期=getdate()
      

  2.   

    select * from 表 where datediff(day,日期,getdate()) = 0
      

  3.   

    最好要加上order by 主键,速度快很多
    select top 6 from table where image is not null order by 主键
      

  4.   

    什么不行啊?
    select * from 表 where datediff(day,日期,getdate()) = 0//查当天记录
    select top 6  字段名 from 表 where image is not null//不为空的记录里查询前面的6条
      

  5.   

    select top 6  字段名 from 表 where image is not null//不为空的记录里查询前面的6条
    不行啊
      

  6.   

    select top 6  字段名 from 表 where image is not null