判断是整型问题

Coolyu0916 2003-11-18 03:15:41
在线
如何判断一列是整型
ISNUMERIC不能判断小数点
...全文
68 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Coolyu0916 2003-11-18
  • 打赏
  • 举报
回复
thanks
zjcxc 元老 2003-11-18
  • 打赏
  • 举报
回复
如果是查询的话,建议用我的方法,这样效率会高一些.
愉快的登山者 2003-11-18
  • 打赏
  • 举报
回复
select * from tablename where colname = cast(colname as int)
zjcxc 元老 2003-11-18
  • 打赏
  • 举报
回复
select * from 表 where isnumeric(字段名)=1 and 字段名 not like '%.%'
愉快的登山者 2003-11-18
  • 打赏
  • 举报
回复
if @a = cast(@a as int)
sdhdy 2003-11-18
  • 打赏
  • 举报
回复
select * from tablename where isnumeric(colname)=1 and charindex('.',cast(colname as varchar(100)))=0
sdhdy 2003-11-18
  • 打赏
  • 举报
回复
select * from tablename where isnumeric(colname)=1 and charindex('.',cast(colname as varchar))=0

34,874

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧