what is primary key,unique key, foreign key? can u teach me
in simple language?

Answer Posted / priya reddy

primary key- if a column is declared as priamry then there
wont be any repeated values in that column throughout that
table, as well as it wont take any null values and we can
use primary key only once in a table. but we can declare
combination of two columns as primary key.
unique- if a column is declared as unique then again there
wont be any repeated values in that column, but this will
take null values and even we can declare more thatn one
unique column in a table.
foreign key-if a column is declared with this key then we
have to use a reference ie we need to give the column which
will have the same values as this column and the table that
column belongs to.. this referced column of other table
will be the primary key of that table.

Is This Answer Correct ?    379 Yes 91 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain transaction manager?

619


how can we view column head in first page but not in remaining pages?

1603


What is the use of graph database?

548


What is the use of default key?

629


A design problem was given in which I was supposed to make a design for the data base for a given problem.

561






How do I manually create a database?

567


What the various ways to tune a teradata query

2793


Explain alternate key?

651


What is a super key?

630


What is the difference between primary and candidate key?

578


query to Compare data of two tables between two different Databases(Oracle and SQL Server) Eg., Source Database: Oracle Table: Employee Target Database : SQL Server Table : emp

1639


how can you perform lookup range in lookup stage expalin in detail?

1525


What is replicaset?

594


How do you connect to a database?

609


aht is the difference b/w network & hierarchial & relational dbms????

1773