File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Multiple columns having same foreign key
Joined: Jul 21, 2010
Sep 06, 2011 04:07:32
In a table I have 2 columns which must refer to same column of another table.
while Executing alter table query for 2nd column it says such a constraint already exists.
Can some one help.. Is this possible?
Joined: Aug 22, 2010
Sep 09, 2011 13:32:39
Yes, it should be possible, like this:
create table a(x number primary key); create table b(y number, z number); alter table b add constraint b_y foreign key(y) references a; alter table b add constraint b_z foreign key(z) references a;
Post your script and error messages if you cannot resolve it.
Don't get me started about those stupid
subject: Multiple columns having same foreign key
MySQL table joining
how to get fixed col width in Firefox
Developing website in English and Arabic
Dynamic creation of custom filter based on the columns visible in the tableColumnHeader
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014