Subject Re: [firebird-support] could not find UNIQUE INDEX with specified columns
Author Martijn Tonies
Hello Joe,

> I can't understand the error message which occures when I try to
> create the following table:
>
> CREATE TABLE test (field1 integer, field2 char(1024), field3 integer,
> PRIMARY KEY (field1), FOREIGN KEY (field3) REFERENCES test(field1))
>
> What do I miss?

A primary key or unique constraint on TEST.Field1.

Create the FK afterwards by using ALTER TABLE instead of trying to create
it at the same time while creating "test".


Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com