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

what is transaction state, buffer management, shadow paging

2926


What is ole db source in ssis?

546


Define stored procedure?

601


How does non-cluster index functions?

641


what are wrappers and build ups and what it's use?

1694






What is a database example?

536


What is lagging in DBMS ?

812


What is ole db ado?

546


WHAT KIND OF TOOL BO IS?

1837


How to produce such kind of file?

623


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

561


What is the difference between primary key, foreign key and candidate key?

644


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

1737


sparse lookup and where its options we find in OCI and db2?

1741


What are the advantages of normalizing a database.

596