Is it safe to do a TO_NUMBER(TO_CHAR(:n)) ? var n number exec :n := 9.9999999999999999999999999999999999e125 select to_number(to_char(:n)) from dual; ORA-01722: invalid number Why? SQL Reference If a positive NUMBER value is extremely large and cannot be represented in the specified format, then the infinity sign (~) replaces the value select to_char(:n) from dual; TO_CHAR(:N) ————– […]
Month: June 2009
committing transaction
When and how do you commit a transaction? SQL> insert into lsc_t(x) values(1); … (1) not committed SQL> commit; … (1) committed SQL> insert into lsc_t(x) values(2); … (2) not committed SQL> alter table lsc_t disable primary key; … (2) committed SQL> set autocommit ON SQL> insert into lsc_t(x) values(3); … (3) committed SQL> set […]