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

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

1821


What is the difference between oracle and MS Access?

817


please tell me the informatica telecom projects interview question? like if they ask about project explanation and the difficulties and the solutions taken to solve the issues for telecom projects,e.g i am workin for a vodafone project handlin postpaid section,pls tell me wat wud be the process if i work in this ? thanks

8237


can we delete autodiff back up that we have set through sql server agent.

1940


diff b/w inter process and in process

1739


Given a table of Player which contains Sno and player name, write a query which finds all possible Table Tennis doubles pairings.

1126


WHAT IS CARDINALITIES OF JOIN?

2114


Is database a hardware or software?

762


what is the role of auditor in auditing data oriented applications?

2141


What are the tools used for backup and ticketing?

761


how to reject duplicates in source sequential file and if by filter option then where is that filter option in the sequential file.

1327


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

739


issues involved in modeling and building data werahouses

1736


What is aws documentdb?

813


What is ole db provider for sql server?

766