"nbiggs" <[EMAIL PROTECTED]> wrote: > I get the following error if I try to use the IF NOT EXISTS function. > If I take out the "IF NOT EXISTS", the statement creates the index. > The same happens when I try using IF NOT EXISTS in a CREATE table > statement. > > CREATE UNIQUE INDEX IF NOT EXISTS idx_table ON table (field1, field2); > SQL error: near "NOT": syntax error > > Any ideas? Thanks for your help. >
The IF NOT EXISTS syntax was added to version 3.3.0 on 2006-01-04. If you upgrade from 3.2.x (or whatever it is you are using) it should work. -- D. Richard Hipp <[EMAIL PROTECTED]>