what is primary key,unique key, foreign key? can u teach me
in simple language?
Answer Posted / nitin bisht
PRIMARY KEY: A tabLe can aontain only one PRIMARY KEY. It
Doesn't allow null values, it is used as Foreign Key In
Another Table(like Reference Key).
UNIQUE KEY: A Table may Contain one or more UNIQUE
constraints. Its aloow 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 ? | 123 Yes | 43 No |
Post New Answer View All Answers
how can you perform lookup range in lookup stage expalin in detail?
WHAT IS CARDINALITIES OF JOIN?
What is relational database with example?
how do you do sql tuning?
Is redis in memory database?
Display the employees whose salary is less than average salary.
what is transaction state, buffer management, shadow paging
hai if any one having any project sample table structure please froward to my mail id tauseefwst@yahoo.com
What is a reference table in database?
What is a driver in database?
What are different types of blocks used in stored procedure?
can any one tell me how i can start database testing mean what should be initial point and how i can write a query for listing page of any item thanks in advance
Which database does facebook use?
What is the difference between specialization and generalization?
Why merge statement is used inside the database?