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 the best database?

515


Explain the table term used in database.

562


Is data lake a database?

556


What is the difference between oracle and MS Access?

605


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

1628






What are different types of resources?

528


Write a query to get maximum and second maximum in oracle?

592


how to configure oracle 10g in java1.5 and tell me know how to set class path in system?

1576


what is rcp,if rcp disabled what happen?

1703


Explain the record term used in database.

654


How to do Stored procedure testing? Who does this testing (Developer or tester)?

1378


Explain normalization in one line?

628


What are different types of joins used in?

615


Should I store images in database?

566


What is the DIF format and when we will use in teradata

2079