From my understanding, primary keys are unique by definition. If that's true, would one ever want to SELECT DISTINCT on the primary key? Is this ever practical/useful?
Is SELECT DISTINCT on Primary Key Column Useful?
distinctprimary-keyselect
Related Question
- Oracle 11g – Creating Composite Primary Key from Multiple Tables
- Sql-server – NVARCHAR column as PRIMARY KEY or as UNIQUE column
- MySQL – Should a Child Table Be Created Without Primary Key?
- Primary Key – Benefits of Auto Increment Primary Key vs No Primary Key
- Sql-server – Is it safe to make a Unique Index the Primary Key
- Database Design – When Should a Primary Key Be Meaningful?
- Postgres – Issues with Not Using a Primary Key Column
- Primary Key – Does It Contain Exactly One Null Value?
Best Answer
If you join with another m:n table that duplicates the PK value in your result set, then it would be useful.