adspace


Explain primary key and foreign key constraints?

Answer Posted / Vikrant

Primary Key is a constraint used to ensure that each record in a table can be uniquely identified. It consists of one or more columns that contain unique values, and it enforces the uniqueness of those values.nnForeign Key is a constraint used to establish a relationship between two tables, where the foreign key in one table references the primary key of another table. It ensures referential integrity by preventing the deletion or modification of primary key values that have associated foreign key values.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to remove duplicate rows from table except one?

1088


Why and when do stored procedure recompile?

1061


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

1023


Is it possible to have clustered index on separate drive from original table location?

1040


Can sql servers link to other servers like oracle?

916


What are the different SQL Server Versions you have worked on?

1079


How can we solve concurrency problems?

1122


What are the different subsets of sql?

1652


Can one drop a column from a table?

1089


What is acid mean in sql server?

1245


what is spatial nonclustered index

1058


do you know how to configure db2 side of the application? : Sql server database administration

1124


Why use identity in sql server?

1199


How do I create a trace in sql server?

1120


Disadvantages of the indexes?

1223