.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

What is the use of CASCADE CONSTRAINTS?

Posted By :Abhisek Panda     Posted Date :December 24, 2009    Points :10   Category :Sql Server 
When this clause is used with the DROP command, a parent table can be dropped even when a child table exists.

You can also find related Interview Question to What is the use of CASCADE CONSTRAINTS?  below: 

What is the use of CASCADE CONSTRAINTS?

  
When this clause is used with the DROP command, a parent table can be dropped even when a child table exists. (More...)

What is the use of CASCADE CONSTRAINTS?

  
When this clause is used with the DROP command, a parent table can be dropped even when a child table exists. (More...)

What is the use of CASCADE CONSTRAINTS?

  
When CASCADE CONSTRAINTS is used with the DROP command, a parent table can be dropped even when a child table exists. (More...)

Explain Constraints in SQL SERVER?

  
Data integrity is an important feature in SQL Server. When used properly, it ensures that data is accurate, correct, and valid. It also acts as a trap for otherwise undetectable bugs within applications.

A PRIMARY KEY:

A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should
have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity.

UNIQUE constraint:

A UNIQUE constraint enforces the uniqueness of the values in a set of columns, so no duplicate values are entered. The unique key constraints are used to enforce entity integrity as the primary key
constraints.

FOREIGN KEY constraint:

A FOREIGN KEY constraint prevents any actions that would destroy links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign
keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity.

CHECK constraint:

A CHECK constraint is used to limit the values that can be placed in a column. The check constraints are used to enforce domain integrity. A NOT NULL constraint enforces that the column will not accept null values. The not null constraints are used to enforce domain integrity, as the check constraints. (More...)

What are constraints in SQL Server?

  
Constraints enforce the data integrity to the database and protect columns of the table from unwanted values. NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY are the types of contraints define in SQL Server.

(More...)

Which option is used to drop constraints specified on the table?

  
DROP option in the ALTER TABLE command is used to drop constraints specified on the table. (More...)

Which of the following requirements define the constraints on the system and the conditions under which the system must be developed?

  
1, Non-functional requirements
2, Functional requirements
3, Data requirements m
4, User requirements

Answer : 1 (More...)

What Is Cascade And Restrict When We Use DROP Table In SQL SERVER ?

  
When we are using Drop table in SQL the syntax is simple.
Drop table table_name(CASCADE / RESTRICT)
We use cascade to drop table although it have some dependencies just like triggers,stroeprocrdure,primarykey,foreignkey it will delete first.
But if we use restrict a error message is shown on using of DROP if the table have relation Trigger,storeprocedure. (More...)

Explain Constraints Of Data Integrity?

  
i) A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity.

ii) A UNIQUE constraint enforces the uniqueness of the values in a set of columns, so no duplicate values are entered. The unique key constraints are used to enforce entity integrity as the primary key constraints.

iii) A FOREIGN KEY constraint prevents any actions that would destroy links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity.

iv) A CHECK constraint is used to limit the values that can be placed in a column. The check constraints are used to enforce domain integrity.

v) A NOT NULL constraint enforces that the column will not accept null values. The not null constraints are used to enforce domain integrity, as the check constraints. (More...)

Difference between primary and unique key constraints

  
Unique Key Constraints
The column values should retain uniqueness.
It allows null values in the column.
It will create non-clustered index by default.
Any number of unique constraints can be added to a table.


Primary Key Constraints
Primary key will create column data uniqueness in the table.
It will not allow Null values.
By default Primary key will create clustered index.
Only one Primary key can be created for a table.
(More...)

Database: How many primary key constraints can be created for one table?

  
Only one primary key constraints can be created for one table. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend