0

Who can repair this it really a wizard. I try to add a column to an existing table. It a compound foreign key column from ather two.

ALTER TABLE valoare_lucrari
ADD COLUMN id_oferta 
FOREIGN KEY (id_ofertant, id_proiect)
REFERENCES valoare_lucrari(id_ofertant, id_proiect)

It may be a problem of sintax or even it all idea wrong. But I need to pot in 'id_oferta'
toghether two foreign keys from 'id_ofertant' and 'id_proiect'

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by cristi08
0

Have you tried adding the new field first then coming back and creating the foreign keys? Do any foreign keys exist now?

0

Yes I tried but nothing happend and the foreign keys exist in the same table

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.