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
can i use the commands "modify" and Change in DB2 to alter my column datatype and its name in a table?
Explain entity ?
What is ole db used for?
Can a database table exist without a primary key?
What are database connection details?
What do you mean by database?
What is odm in database?
how to reject duplicates in source sequential file and if by filter option then where is that filter option in the sequential file.
How many types of normalization? What is the use of it?
What advantages does DBMS have over traditional file systems?
What is a sequence? Explain it with one example?
Define stored procedure?
What are the concurrency problems a database faces?
Explain phantom deadlock?
wHat Is THE difference between MOVEL and MOVEL(P)……….. CAN ANYONE EXPLAIN ME..