What are three major types of constraints?



What are three major types of constraints?..

Answer / Prateek Keshari

The three major types of constraints used in SQL Server to enforce data integrity are:n- Check Constraint: A constraint that checks if a specified condition is true for each new or updated row.n- Foreign Key Constraint: A constraint that ensures referential integrity by linking two tables and enforcing the relationship between them.n- Primary Key Constraint: A constraint used to define a column or set of columns as the primary key, ensuring uniqueness and integrity of data.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is user-defined function?

1 Answers  


What is function of ROLLUP ?

1 Answers   HCL,


9. Write a query to list a new column with the difference in temp of the cities Delhi and Mumbai, Mumbai and Jammu and soon. Consider the following table : City_id City Temp. 1 delhi 40 2 Mumbai 35 3 Jammu 32 4 Pune 18

2 Answers  


1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?

10 Answers   Perot Systems,


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

1 Answers  


Can we insert data into a view?

1 Answers  


A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?

1 Answers  


What is the syntax to execute the sys.dm_db_missing_index_details?

1 Answers  


Differentiate between a local and a global temporary table?

1 Answers  


What is log ldf?

1 Answers  


Why should one not prefix user stored procedures with ‘sp_’?

1 Answers  


Write query to return all rows sql?

1 Answers  


Categories