0

what is wrong here?

ALTER TABLE valoare_lucrari(
ADD CONSTRAINT fk_oferta
FOREIGN KEY (id_ofertant,id_proiect)references(id_ofertant,id_proiect))
2
Contributors
12
Replies
13
Views
7 Years
Discussion Span
Last Post by cristi08
0

I removed the first brace but know It tell me that I have a sintax error at line 3

0
ALTER TABLE valoare_lucrari
ADD CONSTRAINT fk_oferta
FOREIGN KEY (id_ofertant,id_proiect)references(id_ofertant,id_proiect)
0

ALTER TABLE valoare_lucrari(
ADD CONSTRAINT fk_oferta
FOREIGN KEY (id_ofertant,id_proiect)references(id_ofertant,id_proiect))

0

this problem is solved but the command did not altered table at all

]ALTER TABLE valoare_lucrari
ADD CONSTRAINT fk_oferta
FOREIGN KEY (id_ofertant,id_proiect)references valoare_lucrari(id_ofertant,id_proiect)
0

syntax:

ALTER TABLE valoare_lucrari(
ADD CONSTRAINT fk_oferta
FOREIGN KEY ('you need to spicify only one fiedd') references valoare_lucrari('target_field')

0

but I have two columns from I wish to establish a composite foreign key

0

with this

ALTER TABLE valoare_lucrari
ADD CONSTRAINT id_oferta
FOREIGN KEY (id_ofertant,id_proiect)references valoare_lucrari(id_ofertant,id_proiect)

it sais" your query executed ok ",
but no modification in the 'valoare_lucrari' table
do you know how can I generate a composite foreign key ?

This topic has been dead for over six months. 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.