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 many indexes can be created on a table?
Explain natural key?
What are the concurrency problems a database faces?
where can i free download sqlserver2008..i can install sqlserver2008 without visual studio 2008 and work on it
What is the relationship that exists inside in E-R diagram?
How to fetch/retrieve the data from hieranchical database and put it into the relational database? for e.g I want to extract the data from IMS DB2 database which is a hierarchical db and load that data into the relational database which is a SQL server.Are there any tools available for directing extracting data from hierarchical db and loading into the relational database (SQL server)?
What are the disadvantages of views in a database?
What is ole db in ssis?
wHat Is THE difference between MOVEL and MOVEL(P)……….. CAN ANYONE EXPLAIN ME..
Hi, I want do a course in DWH Informatica Administrator and Abinito Administrator please tell me some institute in chennai and i am searching for a job,so please help me and my mail id : satty_rh@yahoo.co.in Thanks, Kumar
Write a query to get maximum and second maximum in oracle?
What will happen non-clustered index will be created on clustered index?
How to do Data integrity testing? Who does this testing (Developer or tester)?
Design an ETL process( batch job/script)from source to starting that u will not be dependent on the source in the near future?please elobarate details on what are things to consider.if you'd like to do a diagram that will be great.please answer it
What are the types of joins?