求助:oracle 查询问题

dengying201 2008-06-25 03:38:13
在一个数据表里有一个字段是number型的,假设表名是table 字段名是num
有一个数据是5.00105000001909E17
用to_char(5.00105000001909E17)转化以后是 500105000001909000
我用两种方式去查询但是都得不到数据,查询方式如下:
select * from table where num=5.00105000001909E17

select * from table to_char(num)=500105000001909000

望高手解答!

...全文
59 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hezhudaozhai 2008-06-27
  • 打赏
  • 举报
回复
select * from table where num=5.00105000001909E17 --> select * from table where num=500105000001909000

select * from table to_char(num)=500105000001909000 -->select * from table to_char(num)='500105000001909000'

可以吧
多壮志 2008-06-26
  • 打赏
  • 举报
回复
你什么版本,怎么没有出现你的情况?我的是10g R2
  • 打赏
  • 举报
回复

select * from table where to_char(num)=500105000001909000
新鲜鱼排 2008-06-25
  • 打赏
  • 举报
回复
select * from table where num=5.00105000001909E17

select * from table where to_char(num)=500105000001909000

这两种方法都好用。
fangbintao 2008-06-25
  • 打赏
  • 举报
回复
select * from table where num=5.00105000001909E17 --> select * from table where num=500105000001909000

select * from table to_char(num)=500105000001909000 -->select * from table to_char(num)='500105000001909000'

17,086

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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