If you have:then the resultant column is of type NUMBER(38) and you can insert into it any number, and rely on Oracle to round to an integer. If you want to do this before inserting, for some reason, then you could just use the ROUND() function.Code:create table t (col1 int);
Having said that, this also works if you're more comfortable with it:Code:SQL> select cast(1.49 as number(38)) from dual; CAST(1.49ASNUMBER(38)) ---------------------- 1 SQL> select cast(1.5 as number(38)) from dual; CAST(1.5ASNUMBER(38)) --------------------- 2




Reply With Quote