Reputation: 5968
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,
Upvotes: 4
Views: 2777
Reputation: 175994
You could use CHECK
constraint:
ALTER TABLE testtable ADD TestColumn Int CHECK(TestColumn > 0);
Upvotes: 8