अगर आप यहां दिखाए गए प्रतिबंधों का मिलान करना चाहते हैं , आप एक चेक बाधा का उपयोग कर सकते हैं:
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