what is primary key,unique key, foreign key? can u teach me
in simple language?
Answer Posted / raviraj bhardwaj
Primary key - Primary key means main key
def:- A primary key is one which uniquely identifies a row
of a table. this key does not allow null values and also
does not allow duplicate values. for ex,
empno empname salary
1 priya 35000
2 preeti 34000
3 niharika 40000
it will not the values as follows:
1 priya 35000
1 preeti 34000
niharika 35000
unique key~ unique key creates non clustered index by
default.it allows "one null value".
forigen key~
when the primary key of one table injected in other table to
make a relationship then the other key of the other table is
called foreign key.
for ex-
Dept table employs
deptno deptmame deptloc eid ename eadd deptno
in it deptno inter relate bothe the tables so that deptno
works here as a forigen kye..
| Is This Answer Correct ? | 15 Yes | 4 No |
Post New Answer View All Answers
Under which circumstance should you create an index on a table?
5. Explain about relational algebra.
On startup, the transaction log of a database has filled and recovery has suspended, what can I do?
Explain phantom deadlock?
What do you mean by database?
What is a Database?
How is image stored in database?
Data structure used to implements a menu:
Is it good to store images in database?
What is a Transformation?
What the various ways to tune a teradata query
How many types of locks are present in a database?
What are the most common databases?
What is the candidate key used for?
What is global database name?