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 darklord
• 6,140 points
1,462 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,680 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,130 points
84 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 darklord
• 6,140 points
83 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
33 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,130 points
1,901 views
0 votes
1 answer

Difference between SQL and PL/SQL

SQL is a query language that allows ...READ MORE

answered Oct 15, 2018 in Database by DataKing99
• 8,130 points
164 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
90 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 darklord
• 6,140 points
39 views
0 votes
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
• 67,480 points
180 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,680 points
82 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,680 points
50 views