Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Table column to accept only whole numbers

JayamApr 27 2017 — edited Apr 27 2017

Hi All,

Is it possible to define a table column data type to accept only whole number when inserting and not decimal number.

123 - Should accept

456 - Should accept

23.4 - Should not accept

2.33 - Should not accept

1 - Should accept

If it is not possible which is the best way to achieve it ( either trigger or check constraint ). Any sample code would be helpful.

Thanks and Regards

JN

This post has been answered by BrunoVroman on Apr 27 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2017
Added on Apr 27 2017
10 comments
1,447 views