Thomas Mueller
unread,Jun 29, 2012, 9:13:21 AM6/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to h2-da...@googlegroups.com
Hi,
I think you are right, the syntax doesn't work as documented. I'm
afraid we will have to either (a) implement it, or (b) change the
documentation. Currently I think (b) is OK.
What you could do is create a constraint. The result is not different
than if you would use "unique" when creating the table: the following
two cases return the same script.
drop table test;
create table test(id int, name varchar unique);
script nodata nosettings;
drop table test;
create table test(id int);
alter table test add column name varchar;
alter table test add constraint constraint_2 unique(name);
script nodata nosettings;
Another approach is to create a unique index.
Regards,
Thomas