What is composite primary key?



What is composite primary key?..

Answer / Monu Sharma

In PostgreSQL, a composite primary key (also known as a compound primary key) is a combination of two or more columns that together serve to uniquely identify each row in a table. This is represented by creating the PRIMARY KEY constraint on multiple columns.n`CREATE TABLE table_name (column1 data_type, column2 data_type, ... PRIMARY KEY (column1, column2));`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Postgre Interview Questions

List different advantages of postgresql?

1 Answers  


What is difference between drop and delete?

1 Answers  


How to start, stop and restart postgresql database?

1 Answers  


Is postgresql free for commercial use?

1 Answers  


Can postgres scale horizontally?

1 Answers  


How many rows can postgresql handle?

1 Answers  


Who maintains postgresql?

1 Answers  


What does psql command do?

1 Answers  


Where is pg_hba conf?

1 Answers  


What can be used in PostgreSQL to send messages to the front-end, and optionally terminate the current query being processed?

1 Answers  


How do you create a table in pgadmin?

1 Answers  


How do I rename a column in postgresql?

1 Answers  


Categories