Can we add foreign key without primary key?



Can we add foreign key without primary key?..

Answer / Nupur Tandon

No, it is not possible to add a foreign key constraint without a corresponding primary key in PostgreSQL. The foreign key references the primary key of another table, ensuring that each value in the foreign key column corresponds to a unique value in the referenced primary key column.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Postgre Interview Questions

Where is pg_hba conf?

1 Answers  


Does aws support postgresql?

1 Answers  


How do you delete a row in pgadmin 4?

1 Answers  


What is ora2pg?

1 Answers  


Explain about functions in PostgreSQL?

1 Answers  


Is postgresql a relational database?

1 Answers  


What does create schema do?

1 Answers  


Is postgresql case sensitive?

1 Answers  


What is psql?

1 Answers  


What does truncate table do?

1 Answers  


How to list the number of database?

1 Answers  


What is composite foreign key?

1 Answers  


Categories