Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

can I check that every cell within multiple columns of a table is unique?

User_7WG5BJun 23 2021

I have a table with a primary key column and 8 other columns. Each cell in the primary key column represents a physical box in a lab. Each cell in the 8 columns represents a physical connection to one of the boxes in the primary key row. I need ensure that each cell in the 8 columns has a unique value (excluding NULL), not only within it's own column and row, but compared to any cell in any column or row within the 8 columns. Is this possible to check in SQL? If so then can you please tell me how it can be done? The primary key column has a table constraint to ensure that values are unique within that column. The columns are already populated, and I need to check there uniqueness every time a cell value is updated.
Thanks,
Chris

Comments

Processing

Post Details

Added on Jun 23 2021
6 comments
148 views