ack, nevermind. User error.
On Sunday, September 8, 2013 12:15:53 PM UTC-7, Brian Craft wrote:
>
> Is it possible to specify a constraint that multiple columns should be
> unique together? I though a unique(a, b) constraint would do it but
> apparently not.
>
> create table `foo` (`id` int, `current` boolean)
> alter table `foo` add constraint `id_current` unique(`id`, `current`)
> insert into `foo` values (1, false)
> insert into `foo` values (1, true) <-- expected a violation here, but
> the insert succeeds
>
> select * from foo
> [{:CURRENT true, :ID 1} {:CURRENT false, :ID 1}] <--- edn object with
> results (via clojure)
>
>
>
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.