Skip to content
Advertisement

Tag: foreign-keys

Foreign Key Used in Composite Primary Key

Is it possible to use a composite foreign key as a piece of a table’s composite primary key? For instance, let’s say I have two tables: … and then in a second table, I would like to reference the foreign key in the second table’s primary key: Is there any way that I can do that? Yes, it might be

How to create relationships in MySQL

In class, we are all ‘studying’ databases, and everyone is using Access. Bored with this, I am trying to do what the rest of the class is doing, but with raw SQL commands with MySQL instead of using Access. I have managed to create databases and tables, but now how do I make a relationship between two tables? If I

Advertisement