Check nullable and value range for one single column data
SQL>
SQL> CREATE TABLE product (
2 product_name VARCHAR2(25),
3 product_price NUMBER(4,2)
4 );
Table created.
SQL>
SQL> ALTER TABLE product ADD (
2 CONSTRAINT valid_price CHECK(
3 product_price IS NOT NULL
4 AND
5 product_price BETWEEN 0 AND 10000
6 )
7 );
Table altered.
SQL>
SQL> drop table product;
Table dropped.
Related examples in the same category