TOP CATEGORIES

×

What does check constraint do?

S

SASWATA KUMAR MALLA

check constraints provide extra restriction for a column during table creation and updation.

example

suppose we want to insert age column i.e new column  in employee existing table. i want only age between 18-25 

so the query will be 

alter table emp

add age number(2) check(age>=16 and age<=25);

0 votes

Your Answer

Email: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)