Rank: Newbie Groups: Member
Joined: 7/19/2007 Posts: 4 Points: 0 Location: Austria
|
Hi I have a host working with mylitteleadmin and i creat some tables. now i wanna make some relationship betwin the tables but i don't know how please help me to learn it. my mylittleadmin is 3.1 thanks
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
In your tables list, click on the table name. In the pop-up menu, choose Details. Click on Keys. You can now create a new Foreign Key or Primary Key.
Hope this helps.
|
Rank: Newbie Groups: Member
Joined: 7/19/2007 Posts: 4 Points: 0 Location: Austria
|
Thanks
|
Rank: Newbie Groups: Member
Joined: 9/16/2009 Posts: 2 Points: 6 Location: Liverpool
|
How do you create a compound foreign key constraint of 4 columns or more? The interface only allows for 3.
|
Rank: Newbie Groups: Member
Joined: 9/16/2009 Posts: 2 Points: 6 Location: Liverpool
|
I answered my own question! Anyone else wondering same thing, just replace the bits in square brackets with your table/field names.
ALTER TABLE [Foreign Key Table] ADD CONSTRAINT [Constraint Name] FOREIGN KEY ([Field_1],[Field_2],[Field_3],[Field_4]) REFERENCES [Primary Key Table]([Field_1],[Field_2],[Field_3],[Field_4])
|