Is it possible to create a positive integer in Oracle ?
I tried the following SQL but none of them is working :
ALTER TABLE testtable ADD TestColumn UNSIGNED;
ALTER TABLE testtable ADD TestColumn UNSIGNED Int;
ALTER TABLE testtable ADD TestColumn Int(Unsigned);
Thanks, Cheers,
You could use CHECK
constraint:
ALTER TABLE testtable ADD TestColumn Int CHECK(TestColumn > 0);
db<>fiddle demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With