SQL> create table detail
2 (id varchar2(1), QTY NUMBER(10,2));
Table created.
memorize: (10-2)=8 digit must be then (dot.) fraction more insert but forms not insert more then 2 digit and sql plus show 2 digits
SQL> insert into detail values('1',55555555555555.444);
insert into detail values('1',55555555555555.444)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',55555555.444);
1 row created.
SQL> insert into detail values('1',5555555555.444);
insert into detail values('1',5555555555.444)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',5555555555.44);
insert into detail values('1',5555555555.44)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',5555555555.4);
insert into detail values('1',5555555555.4)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',555555555.4);
insert into detail values('1',555555555.4)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',55555555.4);
1 row created.
SQL> insert into detail values('1',555555555.4);
insert into detail values('1',555555555.4)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',55555555.44);
1 row created.
SQL> insert into detail values('1',55555555.444);
1 row created.
SQL> insert into detail values('1',55555555.4444);
1 row created.
SQL> insert into detail values('1',55555555.444444);
1 row created.
SQL> insert into detail values('1',55555555.444444444);
1 row created.
SQL> insert into detail values('1',55555555.4444444444444444444444444444444444444444444444444444
1 row created.
SQL> select * from detail
2 ;
I QTY
- ----------
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
8 rows selected.
SQL> insert into detail values('1',55555555.456);
1 row created.
SQL> select * from detail;
I QTY
- ----------
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.5
9 rows selected.
SQL> insert into detail values('1',55555555.056);
1 row created.
SQL> select * from detail;
I QTY
- ----------
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.5
1 55555555.1
10 rows selected.
SQL> insert into detail values('1',55555555.406);
1 row created.
SQL> select * from detail;
I QTY
- ----------
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.4
1 55555555.5
1 55555555.1
1 55555555.4
11 rows selected.
Different
SQL> alter table detail modify qty number(10,5);
alter table detail modify qty number(10,5)
*
ERROR at line 1:
ORA-01440: column to be modified must be empty to decrease precision or scale
SQL> truncate table detail;
Table truncated.
SQL> select * from detail;
no rows selected
SQL> alter table detail modify qty number(10.5);
alter table detail modify qty number(10.5)
*
ERROR at line 1:
ORA-02017: integer value required
SQL> alter table detail modify qty number(10,5);
Table altered.
SQL> desc detail
Name Null? Type
----------------------------------------- -------- ----------------------------
ID VARCHAR2(1)
QTY NUMBER(10,5)
memorize: (10-5)=5 digit must be then (dot.) fraction more insert
SQL> insert into detail values('1',55555555.406);
insert into detail values('1',55555555.406)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',55555.40);
1 row created.
SQL> insert into detail values('1',555555.40);
insert into detail values('1',555555.40)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
SQL> insert into detail values('1',55555.4585858585858558585);
1 row created.
--• Business Solutions: --• Enterprise ERP, Database Management & IT Infrastructure --• AI, Cloud
Subscribe to:
Post Comments (Atom)
https://www.linkedin.com/pulse/building-real-time-database-monitoring-dashboard-oracle-khaleeq-tpwxf/
-
# Report Column (only column): 1. Column Formatting > HTML Expression <span style="display:block; width: 200px"> #...
-
when open forms builder then errors FRM-91129: fatal error: no value specified for required environment variable FORMS_BUILDER_CLASSPATH a...
-
Installing Oracle Forms and Reports 12c on Windows 10 64 Bit. Hardware used for this installation is · Intel i3-2370M CPU · ...
-
I wanted to share a little trick I’ve used in APEX for a while now to conditionally format report columns based on their values. I’m sure th...
No comments:
Post a Comment