On 2/24/16, Klaus Jantzen <k.d.jantzen at mailbox.org> wrote: > Hello, > > after reading the SQLite documentation I decided to change some of my > database > applications to use SQLite. > > Following the syntax descriptions and after some experiments I found out > that one cannot > define a multicolumn constraint ... UNIQUE(col_a, col_b, col_c). > > How would you do that in SQLite?
It is done in SQLite as in all other SQL database engines, using a table constraint. Like this: CREATE TABLE t1(a,b,c,d,UNIQUE(a,b,c)); Note the comma before the UNIQUE keyword. -- D. Richard Hipp drh at sqlite.org

