what is primary key,unique key, foreign key? can u teach me
in simple language?
Answer Posted / anbarasu
UNIQUE KEY: A Table may contain one or more UNIQUE
constraints. It’s allowing only one null value. Use this
key we maintain unique vales in the table.
FOREIGN KEY: A key used in one table to represent the value
of a primary key in a related table. While primary keys
must contain unique values, foreign keys may have
duplicates. For instance, if we use student ID as the
primary key in a Students table (each student has a unique
ID), we could use student ID as a foreign key in a Courses
table: as each student may do more than one course, the
student ID field in the Courses table (often shortened to
Courses. student ID) Will hold duplicate values.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How heap is implemented in database?
Is data lake a database?
What is database server and how it works?
Explain the various types of normalization.
What is the Difference Primary key and Unique Key
How default key is different from primary key?
What is redis good for?
what is the role of auditor in auditing data oriented applications?
Differentiate between unique key and foreign key?
What is lagging in DBMS ?
How do you connect to a database?
Which database is best to store images?
Write a query to get maximum and second maximum in oracle?
Given a table Employee which has columns name and salary, write an SQL query to find the employee with the second highest salary.
Display the employees whose salary is less than average salary.