SELECT * FROM ygm order by IndexNum where mod(indexnum,100)=0
不好用!
还是出错!
我就是想知道%的用法!

解决方案 »

  1.   

    SELECT * FROM mytable
    where (IndexNum%100=0) 
    order by IndexNum
      

  2.   

    %(模)用法可看SQL Server 联机帮助
    示例(联机帮助的)
    下面的示例返回每本书的书号以及年销售总额 (ytd_sales * price) 除以每本书的价格(转换为整型值)所得的模(余数)。USE pubs
    GO
    SELECT title_id, 
       CAST((ytd_sales * price) AS int) % CAST(price AS int) AS Modulo
    FROM titles
    WHERE price IS NOT NULL and type = 'trad_cook'
    ORDER BY title_id
    GO
      

  3.   

    yes, thx u all the dear people!
      

  4.   

    but all dear people,!:(
    敬业一点儿不好吗?试一下好用了,再告诉我嘛!
    害的我空喜一场!
      

  5.   

    "SELECT IndexNum,LinkName FROM ygm where (IndexNum-100*int(IndexNum/100)=0) order by IndexNum"
    暂时用这个方法顶一会吧,等有高手告诉再说!