Re: Order of Table Creation and Foreign Keys

From: Charles Jardine <cj10_at_cam.ac.uk>
Date: 1995/11/28
Message-ID: <49f60r$ba7_at_lyra.csx.cam.ac.uk>#1/1


diamond_at_pavilion.co.uk (diamond) wrote:
>Can any gurus help with this simple question ?
>
>I am creating a small d/b (about 10 tables) and have written and tested the
>SQL scripts to create and populate each table. When I try to add Foreign Keys
>to some tables, I get error message 'Cannot Add Referential Constraint - Parent Keys
>Not Found'.
>
>I think this is something to do with the order in which I create the tables and Primary Keys
>thereon. Is this the case ?
>
>Also, does anyone know a 'foolproof' method for deriving a Table Craetion Order from
>(say) a basic E-R diagram ?

Check out the CREATE SCHEMA command. It is designed to circumvent this precise difficulty. Received on Tue Nov 28 1995 - 00:00:00 CET

Original text of this message