Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is check constraint?

Answers were Sorted based on User's Feedback



What is check constraint?..

Answer / rajeev

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.

If you define a CHECK constraint on a table it can limit the
values in certain columns based on values in other columns
in the row.

Is This Answer Correct ?    2 Yes 1 No

What is check constraint?..

Answer / arihant

example of check constraint

CREATE TABLE Customer_Details(
Cust_ID Number(5) CONSTRAINT Nnull1 NOT NULL
CONSTRAINT Ccheck1 CHECK( Cust_ID BETWEEN 101 AND 105),
Cust_Last_Name VarChar2(20) CONSTRAINT Nnull2 NOT NULL,
Cust_Mid_Name VarChar2(4),
Cust_First_Name VarChar2(20),
Account_No Number(5) CONSTRAINT Pkey1 PRIMARY KEY,
Account_Type VarChar2(10) CONSTRAINT Nnull3 NOT NULL,
Bank_Branch VarChar2(25) CONSTRAINT Nnull4 NOT NULL,
Cust_Email VarChar2(30)
);

Is This Answer Correct ?    1 Yes 0 No

What is check constraint?..

Answer / shaik

Check Constraint defines a condition that each row must satisfy.

create table emp(empid number,ename varchar2(15),salary
number,deptid number constraint emp_salary_min
CHECK(sALARY>1000));

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More MySQL Interview Questions

How do I view a mysql database?

0 Answers  


What is the difference between the LIKE and REGEXP operators?

0 Answers  


How do I install mysql workbench?

0 Answers  


What is the latest version of php and mysql?

0 Answers  


What does "i_am_a_dummy flag" do in mysql?

0 Answers  


Can you tell what are various ways to create an index?

0 Answers  


How to display top 10 rows in mysql?

0 Answers  


How to delete a column and add a new column to database

0 Answers  


The structure of table view buyers is as follows: +----------------+-------------+------+-----+---------+----- -----------+ | Field | Type | Null | Key | Default | Extra | +----------------+-------------+------+-----+---------+----- -----------+ | user_pri_id | int(15) | | PRI | NULL | auto_increment | | userid | varchar(10) | YES | | NULL | | +----------------+-------------+------+-----+---------+----- -----------+ the value of user_pri_id the last row 2345 then What will happen in the following conditions? Condition1: Delete all the rows and insert another row then. What is the starting value for this auto incremented field user_pri_id , Condition2: Delete the last row(having the field value 2345) and insert another row then. What is the value for this auto incremented field user_pri_id

2 Answers  


What do I do if I forgot my mysql root password?

0 Answers  


Which is better mysql or microsoft sql?

0 Answers  


Which statement is used to delete a table in MySQL.

0 Answers  


Categories