CHECK CONSTRAINT

BELOW,  THE CHECK CONSTRAINT IS BEING USED TO PREVENT VALUES FROM

 

— ADD CHECK CONSTRAINT ON A TABL
ALTER TABLE PTBL_CATEGORY
ADD CONSTRAINT POS_CONS_CHK
CHECK (product_category_id >0)
ENABLE NOVALIDATE;

INSERT INTO PTBL_CATEGORY(
product_category_id,
category_name
) VALUES(
-1,
‘BIKES’
);

ROLLBACK;

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top