What does check constraint do?

Query By: PARTH AGHERA

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 Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)