Om du vill matcha begränsningarna som visas här , kan du använda en kontrollbegränsning:
SQL> create table foo (id number primary key,
constraint foo_uint_id check (id between 0 and 4294967295));
Table created.
SQL> insert into foo (id) values (-1);
insert into foo (id) values (-1)
*
ERROR at line 1:
ORA-02290: check constraint (SCOTT.FOO_UINT) violated
SQL> insert into foo (id) values (0);
1 row created.
SQL> insert into foo (id) values (4294967295);
1 row created.
SQL> insert into foo (id) values (4294967296);
insert into foo (id) values (4294967296)
*
ERROR at line 1:
ORA-02290: check constraint (SCOTT.FOO_UINT_ID) violated
SQL> select * from foo;
ID
----------
0
4294967295