I need to put a single value constraint on a column. So you advise me to 
create an index and then assign it the unique constraint?


Le mardi 19 janvier 2021 à 13:53:34 UTC+1, Evgenij Ryazanov a écrit :

> Hello.
>
> H2 preserves the specified name of constraint as is. Your command creates 
> a constraint with the name GS_PAYS_UN1_1. This constraint in H2 needs a 
> compatible index on column GS_PAYS_LIB. If such index wasn't found, H2 
> creates its automatically and name of such index is autogenerated. In your 
> case in can be GS_PAYS_UN1_1_INDEX_3 or some else.
>
> It looks like you check the result in the wrong place. You can read 
> constraints from INFORMATION_SCHEMA.TABLE_CONSTRAINTS table.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/1777f1e9-33dc-49f0-8e6f-671878ece13dn%40googlegroups.com.

Reply via email to