I have two existing but currently unrelated tables. Within a Delphi programme I have tried
ALTER TABLE tblFlights (Airplane TEXT(20) REFERENCES tblAircraft(Airplane));
and variations on this theme, but I keep getting a syntax error. Airplane is the key field in the table tblAircraft and I want to set up a 1-many relationship to the Airplane field in the table tblFlights.
Using the line in a CREATE TABLE statement works fine, but I need to use a separate procedure to set the relationship after the tables already exist.
My SQL knowledge is somewhat sketchy so I would really appreciate help with this one.
ALTER TABLE tblFlights (Airplane TEXT(20) REFERENCES tblAircraft(Airplane));
and variations on this theme, but I keep getting a syntax error. Airplane is the key field in the table tblAircraft and I want to set up a 1-many relationship to the Airplane field in the table tblFlights.
Using the line in a CREATE TABLE statement works fine, but I need to use a separate procedure to set the relationship after the tables already exist.
My SQL knowledge is somewhat sketchy so I would really appreciate help with this one.