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
Why merge statement is used inside the database?
List the properties of a transaction.
Which database is best to store images?
Which database does facebook use?
You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you use?
What is the use of graph database?
What is the best database?
Which is the best graph database?
what is transaction state, buffer management, shadow paging
What is dialect in database?
Explain inner and outer joins with examples.
What is database collection?
Differentiate between extension & intension?
What is the candidate key used for?
How do I manually create a database?