Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
925 views
in Computer by (25.1k points)

Explain with example to create details of employees and give the minimum and maximum in the salary domain.

1 Answer

+1 vote
by (26.0k points)
selected by
 
Best answer

The CHECK constraint is used to limit the value range that can be placed in a column.
If you define a CHECK constraint on a single column it allows only certain values for this column.

Check Constraint at column level:
CREATE TABLE employee
( id number(5) PRIMARY KEY,
name char(20),
dept char(10),
age number(2),
gender char(l),
salary number(lO) CHECK (salary >= 5000 AND salary <= 40000),
location char(10)

s);
In the above example, the salary column is defined as a number column with a check constraint. It checks constraint checks the value that can be stored in the salary column should be greater than or equal to 5000 which is the minimum value and the value is less than or equal to 40000 which is the maximum value for the column salary.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Mar 31, 2020 in Computer by Punit01 (25.1k points)
+1 vote
1 answer
0 votes
1 answer

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...