SELECT * FROM mytable where (IndexNum%100=0) order by IndexNum
%(模)用法可看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
yes, thx u all the dear people!
but all dear people,!:( 敬业一点儿不好吗?试一下好用了,再告诉我嘛! 害的我空喜一场!
"SELECT IndexNum,LinkName FROM ygm where (IndexNum-100*int(IndexNum/100)=0) order by IndexNum" 暂时用这个方法顶一会吧,等有高手告诉再说!
where (IndexNum%100=0)
order by IndexNum
示例(联机帮助的)
下面的示例返回每本书的书号以及年销售总额 (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
敬业一点儿不好吗?试一下好用了,再告诉我嘛!
害的我空喜一场!
暂时用这个方法顶一会吧,等有高手告诉再说!