Constraint check with 'upper' function
SQL>
SQL>
SQL> CREATE TABLE suppliers
2 ( supplier_id numeric(4),
3 supplier_name varchar2(50),
4 CONSTRAINT check_supplier_name
5 CHECK (supplier_name = upper(supplier_name))
6 );
Table created.
SQL>
SQL>
SQL>
SQL>
SQL> ALTER TABLE suppliers
2 enable CONSTRAINT check_supplier_name;
Table altered.
SQL>
SQL>
SQL>
SQL> ALTER TABLE suppliers
2 disable CONSTRAINT check_supplier_name;
Table altered.
SQL>
SQL>
SQL> ALTER TABLE suppliers
2 drop CONSTRAINT check_supplier_name;
Table altered.
SQL>
SQL> drop table suppliers;
Table dropped.
SQL>
Related examples in the same category