Skip to content
Advertisement

SQL unique index explaination

I have seen this for the first time. This is a section in liquibase for defining the unique columns in a table. But I don’t understand which columns are unique.

Are all of the columns mentioned here unique? For example

Or is only

unique?

How to read that? Thank you very much.

Advertisement

Answer

The unique index specifies 5 columns, so generally this means that no two records in the invoice_table can have the same 5 values at the same time. Attempting to do an insert with 5 values already existing in some other record would generate an error.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement