我用的是jdbc自己写的insert语句,用preparedstatment,传进去的就是7.56啊,用的是bigdecimal,不是double和float
解决方案 »
- Oracle的SYSDATE与TIMESTAMP
- 存储过程
- 紧急求助两个数据库关联查询问题
- System.Data.OracleClient 需有 Oracle 用戶端軟體版本 8.1.7 或以上版本
- 紧急!!oracle统计数目的问题
- 帮忙看看什么问题
- 利用prepareCall执行数据库存储过程时,如何接受多个输出参数?
- trigger 的问题 在线等
- 做一个数据库管理员要什么样的资格,或是什么层次才能胜任?
- 表 t1 ,字段 c1 ,c1不是主键所以值有重复。要选择c1的值(不重复),SQL语句如何写?拜托!
- 树形数据表逐级向上汇总更新,求高效SQL范例,具体入内。。
- oracle 怎么修改密码规则, 比如密码长度最少8位
你可以单步执行监测一下,你拼接出的sql语句中,应该就已经变成那一大长串了
----------
7.56
SQL> select * from t where id=7.56; ID
----------
7.56
-- ORACLE NUMBER 类型, 对不同的 9 有不同的显示方式 ,你研究一下。
C:\>sqlplus "oracle/oracle"SQL*Plus: Release 11.2.0.1.0 Production on 星期一 9月 29 10:21:42 2014Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> create table test(d number , id int )
2 /表已创建。SQL> insert into test
2 select 7.9 , 1 from dual union all
3 select 7.99 , 2 from dual union all
4 select 7.999 , 3 from dual union all
5 select 7.9999 , 4 from dual union all
6 select 7.99999 , 5 from dual union all
7 select 7.999999 , 6 from dual union all
8 select 7.9999999 , 7 from dual union all
9 select 7.99999999 , 8 from dual union all
10 select 7.999999999 , 9 from dual
11 /已创建9行。SQL> insert into test
2 select 7.1 , 1 from dual union all
3 select 7.19 , 2 from dual union all
4 select 7.199 , 3 from dual union all
5 select 7.1999 , 4 from dual union all
6 select 7.19999 , 5 from dual union all
7 select 7.199999 , 6 from dual union all
8 select 7.1999999 , 7 from dual union all
9 select 7.19999999 , 8 from dual union all
10 select 7.199999999 , 9 from dual
11 /已创建9行。SQL> set pagesize 100
SQL>
SQL> select * from test
2 / D ID
---------- ----------
7.9 1
7.99 2
7.999 3
7.9999 4
7.99999 5
7.999999 6
7.9999999 7
7.99999999 8
8 9
7.1 1
7.19 2
7.199 3
7.1999 4
7.19999 5
7.199999 6
7.1999999 7
7.19999999 8
7.2 9已选择18行。SQL>