Difference between primary key a composite key

0 votes
Hi!!

Can you tell me the difference between a composite key and a primary key?
Sep 5, 2018 in Database by Sahiti
• 6,320 points
6,486 views

1 answer to this question.

0 votes

Primary key is that column of the table whose every row data is uniquely identified. Every row in the table must have a primary key and no two rows can have the same primary key. Primary key value can never be null nor can be modified or updated.

Composite Key is a form of the candidate key where a set of columns will uniquely identify every row in the table.

answered Sep 5, 2018 by CodingByHeart77
• 3,720 points

Related Questions In Database

0 votes
1 answer

Difference between Inner Join & Outer Join

The difference is as follows: INNER JOIN: Returns all those ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,210 points
273 views
0 votes
1 answer

Difference between clustered and non clustered index in SQL

The differences between the clustered and non ...READ MORE

answered Sep 28, 2018 in Database by Sahiti
• 6,320 points
339 views
0 votes
1 answer

Which one is suitable for real time big database- Primary Key or Unique Index?

What is a unique index? A unique index ...READ MORE

answered Oct 12, 2018 in Database by Frankie
• 9,810 points
126 views
+1 vote
1 answer

Difference between cross join and natural join

The cross join produces the cross product ...READ MORE

answered Oct 12, 2018 in Database by DataKing99
• 8,210 points
7,105 views
+1 vote
2 answers

Difference between SQL and PL/SQL

In Oracle database administration, there are two ...READ MORE

answered Sep 25, 2019 in Database by gautham
356 views
0 votes
1 answer

Can I have multiple primary keys in a single table?

A Table can have a Composite Primary Key which ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,810 points
765 views
0 votes
1 answer

What is a Foreign key?

Foreign key maintains referential integrity by enforcing ...READ MORE

answered Oct 26, 2018 in Database by Sahiti
• 6,320 points
117 views
+1 vote
1 answer

Hadoop: Using composite-key

You can use a Writable, something like ...READ MORE

answered Nov 12, 2018 in Big Data Hadoop by Omkar
• 69,030 points
630 views
0 votes
1 answer

Difference between single and double quotes in SQL

Single quotes are used to indicate the ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,720 points
1,312 views
0 votes
1 answer

Difference between STUFF & REPLACE function

STUFF Function: This function is used to ...READ MORE

answered Oct 10, 2018 in Database by CodingByHeart77
• 3,720 points
882 views