:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Databases >> SQL Server


 Oracle interview questions  Oracle Interview Questions (2040)
 SQL Server interview questions  SQL Server Interview Questions (1082)
 MS Access interview questions  MS Access Interview Questions (25)
 MySQL interview questions  MySQL Interview Questions (194)
 Postgre interview questions  Postgre Interview Questions (6)
 Sybase interview questions  Sybase Interview Questions (22)
 DB Architecture interview questions  DB Architecture Interview Questions (5)
 DB Administration interview questions  DB Administration Interview Questions (213)
 DB Development interview questions  DB Development Interview Questions (53)
 SQL PLSQL interview questions  SQL PLSQL Interview Questions (775)
 Databases AllOther interview questions  Databases AllOther Interview Questions (107)
what is Constraint? How many types of constraints in SQL ?
 Question Submitted By :: SQL-Server
I also faced this Question!!     Answer Posted By  
# 1
Constraint are the rules enforced on data columns on table.

Five type of constraints
Primary key
Unique Key
Foreign Key
Not Null
Is This Answer Correct ?    330 Yes 56 No
# 2
Constraints are used to limit the type of data that can go
into a table.

Is This Answer Correct ?    220 Yes 29 No
# 3
Constraint are the rules enforced on data columns on table

types of constraints:

Is This Answer Correct ?    108 Yes 32 No
# 4
Constraints are used to limit the type of data that can go
into a table.
two basic types of constraints are there
1.column level
2.table level
the difference is that column level constraints are apply
only to one column where as table level constraints are
apply to whole table
Constraints are declare at the time of table creation using

there are 6 constraints used in oracle
Is This Answer Correct ?    92 Yes 23 No
Bimaleswar Patel
# 5
constraints are the rules enforced on data columns on a
use:constraints are used to limit the type of data that
can go in to a table

there are some constraints
a primarykey constraint
a unquekey constraint
a foreinkey constraint
a check constraint
a not null constraint
a default constraint
Is This Answer Correct ?    47 Yes 13 No
# 6
constraint is a mechanism it is used to prevent the invalid
data entry in to the table is called constraint
Is This Answer Correct ?    42 Yes 9 No
# 7
Constraint are used to table columns validations.
there are some constraints.

Primary key,
Foreign Key,
Not Null,
Unique Key,
Is This Answer Correct ?    42 Yes 10 No
Shankar K
# 8
Constraints are rool of data integrity.

Types of Constraints are:
1)Not Null
3)Primary Key
Is This Answer Correct ?    38 Yes 11 No
# 9
Constraint are the rules enforced on data columns on table

Five type of constraints
Primary key
Unique Key
Foreign Key
Not Null
Is This Answer Correct ?    27 Yes 14 No
# 10
There are a number of different ways to implement
constraints, but each of them falls into one of these three
Entity constraints,
Domain constraints,
Referential integrity constraints.

Domain Constraints: A Domain constraint deals with one or
more columns. It is important to ensure that a particular
column or a set of columns meets particular criteria. When
you insert or update a row, the constraint is applied
without respect to any other row in the table. The focus is
on the data that is in the column. These kinds of
constraints will resurface when we deal with Check
constraints, Default constraints and rules and defaults.

Entity Constraints: Entity constraints are all about
individual rows. This constraint ignores the column as a
whole and focuses on a particular row. This can be best
exemplified by a constraint that requires every row to have
a unique value for a column or a combination of columns.
This is to ensure that for a particular row, the same value
does not already exist in some other row. We’ll see this
kind of constraint in dealing with Primary key and Unique

Referential Integrity Constraints: Referential integrity
constraints are created when a value in one column must
match the value in another column. It can either be in the
same table or more typically, a different table. For
example, we are taking orders for a product, and we accept
credit payment. But we will accept only a few standard
credit card companies like Visa, MasterCard, Discover, and
American Express. Referential integrity constraints allow
us to build what we would call a domain table. A domain
table is table whose sole purpose is to provide a limited
list of acceptable values. In our case we have a CreditCard
table with CreditCardID, and CreditCard as fields. We can
then build one or more tables that reference the
CreditCardID column of our domain table. With referential
integrity, any table that is defined as referencing our
CreditCard table will have to have a column that matches up
to the CreditCardID column of our CreditCard table. For
each row we insert into the referencing table, it will have
a value that is in our domain list. We will see more of
this when we learn about Foreign key constraints.
Is This Answer Correct ?    10 Yes 0 No

Other SQL Server Interview Questions
  Question Asked @ Answers
When do we use the UPDATE_STATISTICS command?   4
What is referential integrity? What are the advantages of it? Digital-Domain 4
How to delete particular value in the column of a table.Is it possible or not?if possible give it as in query.   7
How can your resolve deadlocks? IBM 4
what is the difference detween pairwise comparison subquary and non pairwise comparison subquary?   2
my problem is tempdb tempdb(dbname) 77752.95 MB(db size) 25345.03 MB (unallocated size) suppose i increased temp db size 10 gb . after increase the temp db showing 87 gb (dbsize) 25346.03MB(unallocated size)--unallocated size is showing same .please clarify.   1
what is Equity join? ADP 1
write sql program to get the detail of student in a class?   2
Table student containing 2 columns,Join date,Employee name. Under join date 4 rows r ter =1-jan-2008,2-feb-2008,3-mar- 2008,4-feb-2008.Under Employee name 4 difeerent names jaison,robin,binoy,rahul Result set is, Table containing 4-column name=jan,feb,mar,april,,beneath these months count is given as 1,2,1,0 means these counts representing number of emplooyees joined in a month(january 1employee,february 2 employee,march 1 employee,april 0 employee) Can you give me the required sql query Wipro 3
How do we get current date in SQL Server 2000, Oracle, MS Access?   13
Hi all, I need query help for below senorio, could you please help me. TableName = City CITYID ContinuationID CITYNAME 1 1 SAN 1 2 DIEGO 2 1 SAN 2 2 FRANCISCO 3 1 CHICAGO 4 1 NEW 4 2 YORK 4 3 CITY Could you please help me to write a generalized SQL that returns results as given below in the Query result CITYID NAME1 NAME2 NAME3 NAME4 NAME5 1 SAN DIEGO 2 SAN FRANCISCO 3 CHICAGO 4 NEW YORK CITY TCS 5
how to update a null value field in sql server eg a table contains 3 fields id,name,salary and 3 records salary of 1 record is null i want update the nullfield 111 arun 300 112 ddd 200 113 ttt null i want to update table with add 100 to every record include null after updation the recrds should be 111 arun 400 112 ddd 300 113 ttt 100 HCL 6
For more SQL Server Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright © 2013  All Rights Reserved.   ::